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:
- 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:
- Created 3 years ago
- Reactions:12
- Comments:37 (12 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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:
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