question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to authenticate to Azure ML Workspace using Service Principal

See original GitHub issue
  • Package Name: azureml-core
  • Package Version: 1.13.0
  • Operating System: Windows 10.0.18363
  • Python Version: 3.6.2

Describe the bug Unable to authenticate to Azure ML Workspace using Service Principal. I get the following error: AttributeError: ‘AdalAuthentication’ object has no attribute ‘get_token’.

To Reproduce Steps to reproduce the behavior:

  1. pip install azureml-core==1.13.0
from azureml.core import Workspace
from azureml.core.authentication import ServicePrincipalAuthentication

tenant = "tenant"
client = "client"
key = "key"

credentials = ServicePrincipalAuthentication(
           tenant_id=tenant,
           service_principal_id=client,
           service_principal_password=key)

workspace = Workspace.from_config("config.json", auth=credentials)

with config.json file containing information about the Workspace.

Expected behavior To be able of attaching to the Workspace using Service Principal.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:37 (12 by maintainers)

github_iconTop GitHub Comments

8reactions
abijcommented, Sep 18, 2020

It’s not because of AzureML. (downgrading to 1.12.0 causes the same issue.) As @sajalda23409 mentioned it’s related to https://pypi.org/project/azure-mgmt-resource/15.0.0/

Fixed with pinning the previous version: pip install azure-mgmt-resource==10.2.0

Or if you are using Databricks:

if dbutils.library.installPyPI('azure-mgmt-resource', version="10.2.0"):
  dbutils.library.restartPython()
5reactions
nickzhumscommented, Sep 18, 2020

We are taking a look at this issue, and will provide update later For the time being, a workaround is using azure-mgmt-resources 10.2.0 cc @yonzhan @changlong-liu @00Kai0 @jsntcy

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up authentication - Azure Machine Learning
To authenticate to the workspace from a VM or compute cluster that is configured with a managed identity, use the DefaultAzureCredential class.
Read more >
How To Authenticate Into Azure Machine Learning Using The ...
Suppose now you want to access to your Azure ML Workspace using the previous stored service principal credentials. Accessing your Key Vault ...
Read more >
How do I use Service Principal authentication with an Azure ...
Ok, through a lot of trial-and-error I was able to come up with two ... my Azure Machine Learning Pipeline Endpoint through the...
Read more >
azure-ml-deployment - Databricks
Instantiate AML workspace. This uses interactive authentication. A code and message as below will be presented to you: Performing interactive authentication.
Read more >
Manages authentication using a service principle ... - Rdrr.io
Service principal authentication involves creating an App Registration in Azure Active Directory. First, you generate a client secret, and then ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found