Forum Discussion
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
- Vinodh247Super User
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.
- SriVMicrosoft Employee
Thanks Vinod for the confirmation.
- Vinodh247Super User
Please 'Kudos' and 'Accept as Solution' if this answered your query.
- v-nmadadi-msftCommunity Support
- v-nmadadi-msftCommunity Support
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