Authorization Error Using MLClient with System-Assigned Managed Identity on Compute Cluster #39158
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Machine Learning
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
I'm encountering an AuthorizationFailed error when running jobs that utilize MLClient (SDK v2) on Azure Machine Learning compute clusters with managed identities. The authentication appears to fall back to RBAC successfully when executed from a compute instance. However, when attempting to access resources such as workspaces, storage accounts, Key Vaults, and VNets from within a cluster, the following error occurs:
Additionally, when running with a managed identity configured in the cluster, I receive the following error:
Steps to Reproduce:
Configure a compute cluster with a system-assigned managed identity.
Attempt to access the Azure ML workspace using
ml_client.workspaces.get()
within a job running on the cluster.Expected Behavior:
The job should authenticate using the managed identity and access the specified resources without authorization errors.
Actual Behavior:
The job fails with an
AuthorizationFailed
error, indicating that the client does not have the necessary permissions to perform the 'Microsoft.MachineLearningServices/workspaces/read' action.Question:
What is the correct procedure to configure authentication for jobs running on compute clusters using
MLClient
? Is it necessary to create a managed identity, assign it to the clusters, and grant that identity access to the required resources such as storage accounts, Key Vaults, and VNets?We have created a managed identity but have not yet assigned any roles to resources. Before proceeding, we would like to know if this is the right approach since configuring these settings involves bureaucratic processes, including access control security requests.
References:
Set up authentication - Azure Machine Learning
Set up service authentication - Azure Machine Learning
Configure managed identities on Azure virtual machines (VMs)
Additionally, I have not been able to find resources on how to address this issue, and it was not a problem with SDK v1.
Any guidance on properly configuring this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: