Raghavendra
Raghavendra

Reputation: 1

Unable to authenticate to Azure ML Workspace using Service Principal details utilizing GitHub secrets?

I have declared my environmental variables from GitHub Secrets in the YAML file below.

enter image description here

In my Python script, I wrote the following code to access GitHub secrets.

enter image description here

When I’m running an MLOps pipeline to authenticate with the workspace, I encountered the following error.

Traceback (most recent call last):
  File "/mnt/azureml/cr/j/a66028e14ea14d9aaf50233a33dc08ff/exe/wd/prep.py", line 21, in <module>
    from azure_auth import ws, default_datastore
  File "/mnt/azureml/cr/j/a66028e14ea14d9aaf50233a33dc08ff/exe/wd/azure_auth.py", line 167, in <module>
    ws = auth_to_workspace()
  File "/mnt/azureml/cr/j/a66028e14ea14d9aaf50233a33dc08ff/exe/wd/azure_auth.py", line 138, in auth_to_workspace
    TENANT_ID = os.environ["ARM_TENANT_ID"]
  File "/azureml-envs/azureml_5d7a7085adfeffe66ddc4d998b8c45bf/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'ARM_TENANT_ID'

Please provide suggestions or code to resolve the error that occurred during the authentication process to the workspace.

Upvotes: 0

Views: 87

Answers (0)

Related Questions