我正在连接微软Graph Api,以便下载所有用户的电子邮件。我得到的结果是为进行认证的用户下载所有的电子邮件,这对范围内的用户是有效的。 邮件.读取基本信息 .然而,当我试图以 "全局管理员 "的身份进行认证时,范围是 邮件.读取基本信息.All I get the following error:
AADSTS650053: The application 'xxx' asked for scope 'Mail.ReadBasic.All' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor.
The app has allowed the scope 邮件.读取基本信息.All in the settings of Azure portal.
def authenticate():
parameters = {
"client_id": settings["app_id"],
"response_mode": "form_post",
"scope": "Mail.ReadBasic.All User.ReadBasic.All offline_access",
"response_type": "code",
"redirect_uri": "http://localhost:8000/",
"tenant": settings["tenant"]
url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?" + urllib.parse.urlencode(parameters)
return url