question

YiZhu-7665 avatar image
0 Votes"
YiZhu-7665 asked YiZhu-7665 edited

Error in Azure Machine Learning Notebook Using Managed Identity to Authenticate to other resources

I'm trying to access Azure Digital Twins(ADT) resources in an AML notebook via Managed Identity. I've granted access to the workspace in ADT's IAM.
I found out that whatever I put for client_id, it takes more than 2 mins to get back and error showing
ManagedIdentityCredential.get_token failed: Unexpected response 'None'

136737-image.png


Is there anything that I did wrong? Is AML supporting MSI to access other Azure resources now?
(I've tried ways using secrets to authenticate to ADT and it worked. I'm looking for a way that there's no secret needed.)

Thank you!


azure-machine-learningazure-managed-identity
image.png (81.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@YiZhu-7665 Thanks for the question. Can you please share the document that you are trying and compute instance setup.

We have forwarded to the product team for the support of using Managed Identity to Authenticate the digital twins.

Link to setup authentication: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-setup-authentication

0 Votes 0 ·

Hi @ramr-msft !Thanks for getting back! I followed the steps here to create a managed identity of my compute cluster
https://docs.microsoft.com/en-us/azure/machine-learning/how-to-create-attach-compute-studio#managed-identity

And I was able to get access token for blob storage, but not digital twins nor key vault. I'm just curious why blob is supported and what else needs to be done to support digital twins from the identity side. Can you help me to get to someone who knows about the situation? Thank you!

Code snippet:

 credential = ManagedIdentityCredential()
    
 # works
 credential.get_token("https://storage.azure.com/") 
    
 # doesn't work
 credential.get_token("https://digitaltwins.azure.net/.default") 


0 Votes 0 ·

0 Answers