How do I register ADLS as datastore in AMLW (via cli) corrcetly?

Linn Eklund Öström 1 Reputation point


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 .

type: azure_data_lake_gen2
name: XXX
description: Datastore, ADLS and service principal
account_name: XXX
filesystem: XXX
tenant_id: XXX
client_id: XXX
client_secret: XXX

and run
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 :)

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
27,027 questions
{count} votes