No token received using an azure compute cluster as a system-assigned managed identity in a training job
Package Name & Version: azure-identity==1.12.0 azure-keyvault-secrets==4.6.0
**Python Version: **:
3.9
Describe the bug I am trying to run a training job on an Azure ML compute cluster (Terraform resource (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/machine_learning_compute_cluster). The compute cluster has been set up with a system assigned managed identity. As part part of the training job, I am trying to retrieve secrets stored in an Azure key vault. Using the Azure portal I have given get permission for the key vault to the compute cluster.
I am trying to obtain credentials using the following code:
def GetCredentials(): cred = DefaultAzureCredential(additionally_allowed_tenants=['*'], logging_enable=True, exclude_visual_studio_code_credential=True, exclude_shared_token_cache_credential=True) cred.get_token("https://management.core.windows.net/.default" return cred
This is the error message I am getting: error message
This is odd because the process works in another environment with an analogous but different set of Azure resources.
Would you be able to direct me in how to solve this issue?
Thank you :)
Expecting no error message. Successful run logs