-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Azure login does not work for user-managed identities when executed from the VM Instance #27813
Comments
Thank you for opening this issue, we will look into it. |
The issue was that I was providing incorrect user-assigned managed identity id. |
As documented at https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-managed-identity, for user-assigned managed identity, Azure CLI supports 3 types of
So I don't think
It seems you are providing a resource ID:
that's why the provided call stack shows it fails right after L202:
If you provide either azure-cli/src/azure-cli-core/azure/cli/core/_profile.py Lines 205 to 227 in e8efb79
|
Describe the bug
I want to login to azure via cli from the VM Instance that runs ubuntu.
For this I execute:
The VM instance has role assignment with the the role above.
I am getting the following error:
Both VM instance and User managed identity are in the same Subscription and Resource Group
What am I doing wrong?
Related command
Errors
Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned http error: 400, reason: Bad Request
Issue script & Debug output
Expected behavior
successful login
Environment Summary
Additional context
No response
The text was updated successfully, but these errors were encountered: