资源 '00000003-0000-0000-c000-000000000000' 上不存在的范围 'Mail.ReadBasic.All'
scope 'Mail.ReadBasic.All' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'
我正在连接到 Microsoft Graph Api 以下载所有用户电子邮件。我开始为进行身份验证的用户下载所有电子邮件,它适用于范围 Mail.ReadBasic。但是,当我尝试使用范围 Mail.ReadBasic.All 验证为 "global admin" 时,出现以下错误:
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.
该应用允许范围 Mail.ReadBasic。全部在 Azure 门户的设置中。
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
Mail.ReadBasic.All 仅可用作应用程序权限范围而不是委托权限范围。您可以在应用程序的 portal.azure.com 应用程序注册屏幕中同意这一点,并在那里使用管理员同意书才能正常工作。
目前仅在 /beta 端点支持,不支持 /v1.0 端点作为其预览权限范围。
我正在连接到 Microsoft Graph Api 以下载所有用户电子邮件。我开始为进行身份验证的用户下载所有电子邮件,它适用于范围 Mail.ReadBasic。但是,当我尝试使用范围 Mail.ReadBasic.All 验证为 "global admin" 时,出现以下错误:
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.
该应用允许范围 Mail.ReadBasic。全部在 Azure 门户的设置中。
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
Mail.ReadBasic.All 仅可用作应用程序权限范围而不是委托权限范围。您可以在应用程序的 portal.azure.com 应用程序注册屏幕中同意这一点,并在那里使用管理员同意书才能正常工作。
目前仅在 /beta 端点支持,不支持 /v1.0 端点作为其预览权限范围。