Hi, I am trying to get an Azure KeyVault Secret in...
# dotnet
s
Hi, I am trying to get an Azure KeyVault Secret in Pulumi stack. I know that ARM API doesn't allow to do that, therefore we need to use "Data SDK". Here it's mentioned that we can use
GetClientConfig
and
GetClientToken
together with correct SDK to get it working. However, it seems that the token returned from
GetClienToken
has different audience. When I run the code, I get an error:
Copy code
{
  "error": {
    "code": "Unauthorized",
    "message": "AKV10022: Invalid audience. Expected <https://vault.azure.net>, found: <https://management.azure.com/>."
  }
}
I understand the message, however I am wondering how to get a token with correct audience. Any suggestions ?
i
i’m able to get an azure keyvault secret in my pulumi stack …
probably should ask this in #azure
s
I guess you are using Azure Classic ?
i
AzureNative
s
can you show some code ?