AzureML: User managed identity attached to compute cluster does not work
See original GitHub issue- Package Name: azure-identity
- Package Version: 1.5.0
- Operating System: Linux
- Python Version: 3.7
Describe the bug
A custom docker container running on a compute cluster with a user managed identity does not seem to authenticate with Azure identity when running in AzureML
This is the logs I when I run my python code:
WARNING 2020-12-21 18:04:30,166 azure.identity._internal.get_token_mixin AppServiceCredential.get_token failed: No token received.
WARNING 2020-12-21 18:04:30,166 azure.identity._internal.decorators ManagedIdentityCredential.get_token failed: No token received.
WARNING 2020-12-21 18:04:30,166 azure.identity._credentials.chained ChainedTokenCredential.get_token failed: ManagedIdentityCredential raised unexpected error "No token received."
WARNING 2020-12-21 18:04:30,166 azure.identity._credentials.chained ChainedTokenCredential failed to retrieve a token from the included credentials.
Attempted credentials:
ManagedIdentityCredential: No token received.
To Reproduce Steps to reproduce the behavior:
- Create a compute cluster with a managed identiy attached to read data from a blob storage
- Create a custom docker image with the azure sdk to fetch data from blob storage
- Run the aforementioned docker image in the AzureML cluster created above.
Expected behavior Python SDK can authenticate using a manged identity.
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (12 by maintainers)
Top Results From Across the Web
Set up service authentication - Azure Machine Learning
The Azure ML compute cluster uses a managed identity to retrieve connection information for datastores from Azure Key Vault and to pull Docker ......
Read more >No more passwords, please!. How Azure Machine Learning ...
The best way to assign a managed identity to a Compute Cluster is to specify the managed identity when the Compute Cluster is...
Read more >Manage access to an Azure Machine Learning workspace
NOTE: "az ml workspace share" command does not work for federated account by Azure Active ... User-assigned managed identity with Azure ML compute...
Read more >azurerm_machine_learning_com...
At the moment, there is also no possibility to specify ssh User Account ... Managed Identity IDs to be assigned to this Machine...
Read more >Exam DP-100 - NET
You can also configure managed identities for use with Azure Machine Learning compute cluster. This managed identity is independent of ...
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 Free
Top 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

Hi @mccoyp thanks for your response.
Yes I have used a custom docker images based on
nvidia/cudaruntime image.I have managed to fix the issue by doing the following things:
identity.ManagedIdentityCredential(client_id='MY_CLIENT_ID)(MY_CLIENT_ID is the client id of the managed identity attached to the compute cluster in the workspace). Without setting theclient_idthe authentication fails.Does this make sense to you?
Thanks
Ok understood. I get warnings and eventually a clear authentication error like below…
The warnings are similar to what the original issue described, so that’s how I ended up here. Anyway, thanks for your help!