Azure AD B2C - Microsoft Graph API - Authorization_IdentityNotFound

标签 azure microsoft-graph-api azure-ad-b2c

我已成功设置 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 yetFollow this guide使用 Azure AD Graph API。

关于Azure AD B2C - Microsoft Graph API - Authorization_IdentityNotFound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46339069/

相关文章:

azure - 更改默认图片 - 注册流程 - AZURE - ADB2C

启用 Azure Active Directory 身份验证时,Azure 移动应用将 Http POST 调用重定向到 GET

active-directory - 如何使用 Microsoft Graph 只获取真实用户

c# - Microsoft Graph API,文件夹资源类型

c# - 通过电子邮件地址查找用户

ios - 如何在 iOS 应用程序中实现 Azure AD B2C PasswordReset 功能

Azure 函数本地 (CLI) 与云 dll 不匹配

Azure blob 存储 : Shared access signature for multiple containers?

node.js - Azure Node.js Express应用程序scaffold.xml丢失

c# - Microsoft.Graph.GraphServiceClient Planner Buckets AddAsync 返回错误 "Write requests are only supported on contained entities"