-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use get_managed_token for system assigned MI or user assigned MI within App Service, error 404 #75
Comments
I was experiencing the exact same issue as you described and your workaround is working flawlessly for us now! Thank you so much! And indeed the package is in dire need of an update... |
The endpoint should already be taken from the MSI_ENDPOINT environment variable, the same as what you've got in your sample code. It gets the secret from the MSI_SECRET variable as well, but it puts it into the HTTP 'secret' header instead of 'X-IDENTITY-HEADER'. Are you sure you've got your variables set correctly? In particular, don't put the |
Below is untested but perhaps the second token part is added in this snippet in
|
Yes, the |
Hello, ok thanks for the clarification. Within an App Service the system assigned MI MSI_ENDPOINT environment variable is set by azure and includes the |
Are there any prospects for fixing this? |
Hello,
Using a system or user assigned identity in combination with
get_managed_token
gives a 404 error. Could not get the function working from within an app service running a Shiny app using a managed identity to access a storage account. AzureAuth seems to make the wrong API call at and endpoint/MSI/token/token
that does not exist and hence returns 404 since it should behttp://{endpoint}/MSI/token
. From within a VM for local development obtaining a token using managed identity using AzureAuth works as expected.Current workaround for the app service is to create the API call manually instead of using AzureAuth for a system assigned MI reading data from a storage account in a Shiny app hosted in App Services.
The text was updated successfully, but these errors were encountered: