Dump repo for Python console app (Microsoft ADAL Authentication)
Demo for python console app (browserless) using MSAL Authentication. Based on Python sample for Microsoft Graph.
Install prerequisite python packages:pip install -r requirements.txt
Register an application in Azure portal.
Users.Read.All
and Users.Readbasic.All
. https://login.microsoftonline.com/common/oauth2/nativeclient
yes
config.py
'ENTER_YOUR_CLIENT_ID'
with your Application (client) ID'ENTER_YOUR_EMAIL_ADDRESS'
with your Office 365 email address'ENTER_YOUR_PASSWORD'
with your Office 365 passwordpython sample.py
in your terminale.g.
https://graph.microsoft.com/v1.0/users/MiriamG@M365x214355.onmicrosoft.com/manager
If you are seeing the Authorization_RequestDenied: Insufficient privelleges to complete the operation.
error, contact your administrator and request admin consent for Users.Read.All
and Users.Readbasic.All
permissions.
In your azure portal, under Home > App Registraions > API Permissions, the permissions should look as follows: