Skip to content

Instantly share code, notes, and snippets.

@isvargasmsft
Last active October 12, 2023 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isvargasmsft/785e58a5ee92511e051fa48cfe99cfeb to your computer and use it in GitHub Desktop.
Save isvargasmsft/785e58a5ee92511e051fa48cfe99cfeb to your computer and use it in GitHub Desktop.
Auth example for Python SDK
# Example using async credentials and application access.
from azure.identity.aio import ClientSecretCredential
from msgraph import GraphServiceClient
credential = ClientSecretCredential(
'TENANT_ID',
'CLIENT_ID',
'CLIENT_SECRET',
)
scopes = ['https://graph.microsoft.com/.default']
client = GraphServiceClient(credentials=credential, scopes=scopes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment