How do I register ADLS as datastore in AMLW (via cli) corrcetly?
I'm trying to create a datastore from an ADLS (Gen2) using azure cli (using version 2.42), with credentials using service principal. The service principal is added as Storage Blob Data Reader to my ADLS. I use the following schema (with XXX replaced by correct details), file is named create-datastore-azure-adls.yml .
description: Datastore, ADLS and service principal
az ml datastore create --file create-datastore-azure-adls.yml --workspace-name $WORKSPACENAME --resource-group $RESOURCENAME --subscription $SUBSCRIPTIONID
The datastore ends up in my workspace but I can't read from the datastore. When I look at it in the workspace it is not connected to any subscription-id nor resource group (see image).
However, if I choose update authentication and fill in subscription-id and resource group everything works. So my question is if there is any way I can't do it correctly, only using the cli, eg. adding this info (subscription-id and rg-name) to the schema? So I don't have to update authentication in the workspace every time :)
I think you are following the guidance here - https://learn.microsoft.com/en-us/azure/machine-learning/how-to-datastore?tabs=cli-account-key%2Ccli-adls-sp%2Ccli-azfiles-account-key%2Ccli-adlsgen1-identity-based-access#create-an-azure-blob-datastore
Have you tried the SAS way to see if that works?
Sign in to comment