我已成功设置 Azure B2C,人们可以登录等。 现在我想以编程方式访问 Azure AD。因此,我在 Azure AD B2C 租户中创建了一个新的应用程序注册,授予了所有可能的权限,并授予了管理员同意。基本上遵循了here概述的所有步骤.
我可以成功检索访问 token ,但是当我调用 Graph API 时,我收到此错误:
{
"error": {
"code": "Authorization_IdentityNotFound",
"message": "The identity of the calling application could not be established.",
"innerError": {
"request-id": "7d96b137-c45c-4440-a14f-51227b9fa379",
"date": "2017-09-21T08:24:56"
}
}
}
其他帖子表明权限错误(我已授予 MS Active Directory 和 Microsoft Graph 的所有可能权限)和/或不同意。
奇怪的是,如果我调用/users/.../drive/root/children 我会收到不同的错误,表明它可以找到我的租户:
{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "9018c1d1-f3a9-421d-9c9d-011ff710ed53",
"date": "2017-09-21T08:30:11"
}
}
}
从 Azure AD Graph 切换到 Microsoft Graph 后,调试变得很困难。
最佳答案
您不能使用Microsoft Graph API for B2C yet 。 Follow this guide使用 Azure AD Graph API。
关于Azure AD B2C - Microsoft Graph API - Authorization_IdentityNotFound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46339069/