Closed
Description
openedon Jan 8, 2021
Hello everyone,
At my job I am faced with a problem related to the depreciation of ADAL in favor of MSAL. I am somewhat confused on this issue and would like to receive some help or guidance for solving the situation.
I am working on an application that uses azure-common
and azure-graphrbac
to get a list of Azure users.
If I'm not mistaken, this workflow would be obsolete in no time and I should migrate it to use MSAL and Microsoft Graph.
The inconvenience I have is that I can't find an alternative library to replace the mentioned ones, or maybe, I'm going the wrong way.
This is a sample of the code I use:
from azure.common.credentials import ServicePrincipalCredentials
from azure.graphrbac import GraphRbacManagementClient
credentials = ServicePrincipalCredentials(
client_id=azure_application_id,
secret=azure_application_secret,
tenant=azure_domain,
resource="https://graph.windows.net",
)
graphrbac_client = GraphRbacManagementClient(credentials, azure_domain)
users = graphrbac_client.users.list()
Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment