VM: Unable to Add Azure Key Vault Through AzureServiceTokenProvider: No Connection string #5275
Labels
Mgmt
This issue is related to a management-plane library.
needs-author-feedback
Workflow: More information is needed from author to address the issue.
no-recent-activity
There has been no recent activity on this issue.
I tried to connect to an Azure Key Vault via a Virtual Machine with the AzureServiceTokenProvider pattern, but failed (see 1 below). The VM was setup for MSI. As a I stepped through the code, I noticed that it checks the environment variables for some MSI related configuration but my VM had neither of the variables. Since I added the Identity after I created the VM, I thought maybe if I setup a new VM with Identity set from the get-go everything would be good. I was wrong.
Error: Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException: Parameters: Connectionstring: [No connection string specified]
So, I followed the steps in link 2 (which I should have used in the first place). Essentially, these instructions make calls through the REST API. It mostly works, though it is not as syntactically sugary.
What's strange is that the backup behavior of attempt 1 is to contact the IDMS instance (169.254.169.254/metadata/identity/oauth2/token) that attempt 2 explicitly calls. I'm out of time to understand what the missing link is.
However, if anyone has the same problem, I'd be glad to submit a PR with my solution. All I did was mix 1 and 2. Or if someone could show me how I'm over complicating things, that'd be even better.
Solution:
The text was updated successfully, but these errors were encountered: