[QUERY] User Managed Identity not working
See original GitHub issueQuery/Question
Created this issue on behalf of @dsm4u, please be sure to include them on any questions or replies.
I am trying to use usermanaged identity to access storage account from VM scale set. Created a managed identity, added it to scaleset and then given storage contribute access to the identity for the storage account.
But when i try to access the storage account via .net console app running on the scaleset instance, it giving authentication error.
The same scenario is working fine for system managed identity,
Can you please advise.
These are the steps I have followed:
- Created a Manged Identity via portal.
- In the Virtual Scaleset, went to the identity and added the newly created identity as user assigned identity.
- In the portal, went to the storage account, and in the access control (IAM) added role assignment. In that selected user assigned managed identity and selected the identity created above.
- These are the configuration done on the portal level.
- Now in the console app used the queue client and tried to access the storage account. and the console app was executed from the scale set instance. code as below: QueueClient queueClient = new QueueClient(queueUri, new DefaultAzureCredential(false)); var message = queueClient.ReceiveMessage();
Please do let me know if any other details required on this.
Environment:
- Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.2.0]
- Hosting platform or OS and .NET runtime version (
dotnet --info
output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8] - IDE and version : [e.g. Visual Studio 16.3]
Issue Analytics
- State:
- Created 2 years ago
- Comments:29 (14 by maintainers)
Top Results From Across the Web
Known issues with managed identities for Azure resources
This article discusses a couple of issues around managed identities and how to address them. Common questions about managed identities are ...
Read more >Using User Managed Identity in Azure function Service Bus ...
I have a function that uses Service bus trigger and wanted to use "User Managed Identity". I couldn't get this working even after...
Read more >Using Managed Identities to access Azure SQL
The main problem is that adding a managed identity as a SQL Server user is a bit complex. And, requires some “privilege tweaking”....
Read more >Azure Function and User Assigned Managed Identities
Let's talk about authentication between Azure Functions and resources used by Azure Functions and conclude with many poorly documented ...
Read more >How to use Azure Managed Identity
In this article, we will look at what Azure Managed Identities are, how to create them and use them of course.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI - These docs explain this behavior
Thanks this worked… Also, observed that if we turn off the system managed identity for the scaleset and enable only user managed identity then its working fine without explicitly setting the clientid.