Skip to content

Unable to authenticate to Azure ML Workspace using Service Principal #13871

@gison93

Description

@gison93
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MgmtThis issue is related to a management-plane library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions