import requests
tenant = 'yourtenant.onmicrosoft.com'
client_id = 'your-client-id'
client_secret = 'your-client-secret'
# 获取访问令牌
token_url = f'https://login.microsoftonline.com/{
tenant}/oauth2/v2.0/token'
token_data = {
'grant_t
import requests
tenant = 'yourtenant.onmicrosoft.com'
client_id = 'your-client-id'
client_secret = 'your-client-secret'
# 获取访问令牌
token_url = f'https://login.microsoftonline.com/{
tenant}/oauth2/v2.0/token'
token_data = {
'grant_t