Skip to content

Unable to authenticate to Azure GraphRBAC using DefaultAzureCredential OR CredentialWrapper #14022

@bensussman

Description

@bensussman
  • Package Name: azure-graphrbac
  • Package Version: 0.61.1
  • Operating System: Mac OS 10.14.6
  • Python Version: Python 3.7.6

Describe the bug
We are unable to use the DefaultAzureCredential OR the CredentialWrapper class (cred_wrapper.py) to authenticate the graphrbac client to create an App, Service Principal, and secret key.

NOTE: I am able to get the API to work if i use UserPassCredentials instead.

To Reproduce
Steps to reproduce the behavior:

  1. Log into azure using the azure cli locally.
  2. Run python, import azure-graphrbac, and then use DefaultAzureCredential or the CredentialWrapper class (cred_wrapper.py) to create a credential object with the currently-logged-in-user credentials.
  3. These credentials are valid to do other azure operations (for example creating a Blob storage container), but when used with graphrbac to create an App, it prints the following error:
azure.graphrbac.models.graph_error_py3.GraphErrorException: Access Token missing or malformed.

Expected behavior
I expect the DefaultAzureCredential or the CredentialWrapper class (cred_wrapper.py) to return credentials that are valid for graphrbac.

Additional context
In addition, this entire Python API is (admittedly newly) legacy and is being deprecated in favor of the Microsoft Graph API here https://docs.microsoft.com/en-us/graph/api/application-post-applications . However there does not seem to be a Python API client that allows us to use this new API yet...

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Graphcustomer-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