Replies: 1 comment
-
Using msalimport msal
client = msal.ConfidentialClientApplication(
client_id=self.auth_settings['clientId'],
client_credential=self.auth_settings['clientSecret'],
authority=f"https://login.microsoftonline.com/{self.auth_settings['tenantId']}")
token = client.acquire_token_by_username_password(
username=self.auth_settings['username'],
password=self.auth_settings['password'],
scopes=self.auth_settings['graphUserScopes'])
>>> token['access_token']
eyJhb... Using msgraph-sdk and azure-storage-blobfrom azure.identity import UsernamePasswordCredential
from msgraph import GraphServiceClient
client = GraphServiceClient(
credentials=UsernamePasswordCredential(
client_id=self.auth_settings['clientId'],
client_credential=self.auth_settings['clientSecret'],
username=self.auth_settings['username'],
password=self.auth_settings['password'],
tenant_id=self.auth_settings['tenantId']
),
scopes=self.auth_settings['graphUserScopes']
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently using a custom implementation of the graph api and want to use this sdk.
My authentication is done by providing following:
What authentication library I can use?
Beta Was this translation helpful? Give feedback.
All reactions