Skip to content

Auth failure when running az ommand on newly provisioned compute instance in AzureML #29

@KBaroni

Description

@KBaroni

Ran into the auth error below when running this az command from a newly provisioned compute instance terminal:
(azureml_py38) azureuser@mlops1:~/cloudfiles/code/Users//mslearn-mlops/src$ az ml job create --file job.yml --workspace-name --resource-group

It does not appear to be a permissions issue since I am the owner of the workspace, the resource provider Microsoft.MachineLearningServices is registered, and the default datastore credentials use account key which were updated and saved to the data store.

This is the error:
Error with code: (AuthorizationFailed) The client < >' with object id '< >' does not have authorization to perform action 'Microsoft.MachineLearningServices/workspaces/datastores/read' over scope '/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/resourceGroups//providers/Microsoft.MachineLearningServices/workspaces//datastores/workspaceblobstore' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed

I can confirm there is a work-around which is to run the following sequence in full on the compute instance terminal:
11 az extension list
12 az extension remove -n azure-cli-ml
13 az extension remove -n ml
14 az extension add -n ml
15 az ml -h
16 az upgrade
17 az extension update -n ml
18 run_id=$(az ml job create -f jobs/single-step/scikit-learn/iris/job.yml --query name -o tsv)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions