Azure-docs: Client secret for native apps?

Created on 13 Jun 2018  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

'Make sure that you chose WEB APPLICATION AND/OR WEB API if you did not you will not see the keys option under settings.'

What about native apps? I have embedded the Power BI reports in my application. In my backend application (native app), i need to access the Key Vault but there's no option of getting a client secret for native apps.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author key-vaulsvc product-question triaged

Most helpful comment

@ramandeep-singh-1983 While we don't specifically go over native applications in the get started article we do have a blog post from one of the Key Vault PMs covering this scenario. https://blogs.technet.microsoft.com/kv/2016/09/17/accessing-key-vault-from-a-native-application/ We are always updating the documentation and this scenario is part of the items we hope to address in the next couple of months as part of the documentation. In the time being, I hope the blog post helps you move forward with your application.

All 6 comments

@ramandeep-singh-1983 While we don't specifically go over native applications in the get started article we do have a blog post from one of the Key Vault PMs covering this scenario. https://blogs.technet.microsoft.com/kv/2016/09/17/accessing-key-vault-from-a-native-application/ We are always updating the documentation and this scenario is part of the items we hope to address in the next couple of months as part of the documentation. In the time being, I hope the blog post helps you move forward with your application.

sounds good, thanks! I was able to integrate the KeyVault using the new managed identity stuff but i will check out the link you have shared.

please-close

@ramandeep-singh-1983 We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

Hi, I was hoping you could point me towards some clarification on the article you linked to?
(https://blogs.technet.microsoft.com/kv/2016/09/17/accessing-key-vault-from-a-native-application/)
after going through the setup, I'm not quite clear on what I should pass as the resource parameter to the AcquireTokenAsync... I tried with with a number of names and ids for what I assumed it could be referring to but I keep getting an invalid_resource exception...
It's also not clear what the authority parameter is, though I believe I am getting that one.

:
:
/// Get AAD token
var context = new AuthenticationContext(authority, TokenCache.DefaultShared);
var result = await context.AcquireTokenAsync(resource, clientId, new Uri(clientRedirectURI), new PlatformParameters(PromptBehavior.Always));

Thank you so much

ok, I got it...
the resource is "https://vault.azure.net"
I assumed it was the URL of my specific vault that I created...

Was this page helpful?
0 / 5 - 0 ratings