Forum Discussion

SriV's avatar
SriV
Microsoft Employee
8 months ago
Solved

Connecting to AML Workspace from Fabric Notebook

Hi,

 

I am trying to authenticate to AML workspace from Fabric Notebook using DefaultAzureCredentials. While running the command, I am getting the below error saying failed to retrive token. I have granted Fabric Workspace Identity to AML workspace with contributor and owner permission. While searhcing the online, I see that the only auth mechanism is through SPN/Secret route. Is there a limitation connecting from Fabric Notebook to AML?

 

DefaultAzureCredential failed to retrieve a token from the included credentials. Attempted credentials: EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.

  • Yes, there is a limitation. Fabric notebooks run inside a sandboxed env that does not support managed identity based auth to external azure services such as azure ML. DefaultAzureCredential will not work because the fabric runtime does not expose a MI, even if you grant permissions on the ML workspace. That is why the token retrieval fails.

    Right now, the only reliable approach is to authenticate using a service principal (client id and secret or certificate). MSI from Fabric to AML is not supported at this time.

     

5 Replies

  • Yes, there is a limitation. Fabric notebooks run inside a sandboxed env that does not support managed identity based auth to external azure services such as azure ML. DefaultAzureCredential will not work because the fabric runtime does not expose a MI, even if you grant permissions on the ML workspace. That is why the token retrieval fails.

    Right now, the only reliable approach is to authenticate using a service principal (client id and secret or certificate). MSI from Fabric to AML is not supported at this time.

     

    • Vinodh247's avatar
      Vinodh247
      Super User

      Please 'Kudos' and 'Accept as Solution' if this answered your query.

  • Hi SriV 

    I wanted to check if you had the opportunity to review the valid information provided by Vinodh247 . Please feel free to contact us if you have any further questions.


    Thank you.

  • Hi SriV 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you