-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
- 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:
- Log into azure using the
azure clilocally. - Run
python, importazure-graphrbac, and then useDefaultAzureCredentialor the CredentialWrapper class (cred_wrapper.py) to create acredentialobject with the currently-logged-in-user credentials. - These credentials are valid to do other azure operations (for example creating a Blob storage container), but when used with
graphrbacto 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...