使用图形 API 创建 Azure AD B2C 社交帐户
Creating Azure AD B2C Social Account using graph API
我已将 google 和 facebook 添加为我的 Azure AD B2C 租户的身份提供者。现在我想使用 azure ad graph api 为 google 和 facebook 创建社交用户。在 api 文档中提到 "userIdentities" 是必需的属性,它必须是 "issuer" 和 "issuerUserId" 的子属性。对于 "issuer" 很清楚应该是什么值,但我无法找到如何为 identityProvider 获取 "issuerUserId"。它被描述为 "The unique user identifier used by the social identity provider" ,之前我认为它对于身份提供者是唯一的,但当尝试时它不是。同一身份提供者的不同用户需要传递不同的值。
我经历了 https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations ,所以我认为它与用户属性有关,但仍然不确定如何生成值以传递给 api 调用?
或者任何随机值都可以?
我假设您在这里指的是 user migration 的文档。
文档提到
Depending on the identity provider, the Issuer User ID is a unique
value for a given user per application or development account.
Configure the Azure AD B2C policy with the same application ID that
was previously assigned by the social provider or another application
within the same development account.
这里的假设是,当您从旧系统迁移用户时,您已经从 Google 和 Facebook 等社交帐户中获得了这样的 unique identifier
。它可以以 base 64 编码形式使用。
这也有助于了解您的场景?
我已将 google 和 facebook 添加为我的 Azure AD B2C 租户的身份提供者。现在我想使用 azure ad graph api 为 google 和 facebook 创建社交用户。在 api 文档中提到 "userIdentities" 是必需的属性,它必须是 "issuer" 和 "issuerUserId" 的子属性。对于 "issuer" 很清楚应该是什么值,但我无法找到如何为 identityProvider 获取 "issuerUserId"。它被描述为 "The unique user identifier used by the social identity provider" ,之前我认为它对于身份提供者是唯一的,但当尝试时它不是。同一身份提供者的不同用户需要传递不同的值。 我经历了 https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations ,所以我认为它与用户属性有关,但仍然不确定如何生成值以传递给 api 调用? 或者任何随机值都可以?
我假设您在这里指的是 user migration 的文档。 文档提到
Depending on the identity provider, the Issuer User ID is a unique value for a given user per application or development account. Configure the Azure AD B2C policy with the same application ID that was previously assigned by the social provider or another application within the same development account.
这里的假设是,当您从旧系统迁移用户时,您已经从 Google 和 Facebook 等社交帐户中获得了这样的 unique identifier
。它可以以 base 64 编码形式使用。
这也有助于了解您的场景?