I just want to be able to use the Planner API. See code below:
from O365 import Account
credentials = (CLIENT_ID, CLIENT_SECRET)
base_url = "https://graph.microsoft.com"
scopes = [
'User.Read.All',
'offline_access',
'openid',
'profile'
]
account = Account(credentials)
if not account.is_authenticated:
account.authenticate(scopes=scopes)
else:
print("Authenticated")
response = requests.get(f"{base_url}/{version}/{query_parameters}")
print(response)
The output I get is Response 401, even though earlier I did manage to print "Authenticated". I've already registered my app in Azure Portal, and have enabled multi-tenant. My client ID and client secret is also obtained from there. Why am I still getting 401 response error?
.