简体   繁体   English

使用图 API 创建 Azure AD B2C 社交帐户

[英]Creating Azure AD B2C Social Account using graph API

I have added google and facebook as Identity Provider for my Azure AD B2C tenant.我已经为我的 Azure AD B2C 租户添加了 google 和 facebook 作为身份提供者。 Now I want to create social users for both google and facebook using azure ad graph api.现在我想使用 azure 广告图 api 为 google 和 facebook 创建社交用户。 In api documentation it is mentioned that "userIdentities" is required attribute which is having to sub attributes "issuer" and "issuerUserId".在 api 文档中提到“userIdentities”是必需的属性,它必须具有子属性“issuer”和“issuerUserId”。 for "issuer" it is quite clear what should be the value, but am not able to find how to get "issuerUserId" for identityProvider.对于“颁发者”,很清楚应该是什么值,但我无法找到如何为 identityProvider 获取“issuerUserId”。 It is described as "The unique user identifier used by the social identity provider", earlier i thought it is unique for identity provider but when tried it is not.它被描述为“社交身份提供者使用的唯一用户标识符”,之前我认为它对于身份提供者来说是唯一的,但在尝试时却不是。 Different value needs to passed for different user of same identity provider.需要为同一身份提供者的不同用户传递不同的值。 I went through https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations , so i think it is related to user attributes but still not sure how generate value to pass in api call?我经历了https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations ,所以我认为它与用户属性有关,但仍然不确定如何生成值以传递 api 调用? Or any random value is ok?或者任何随机值都可以?

I assume you are referring to the documentation for user migration here.我假设您指的是此处的用户迁移文档。 The documentation mentions文档提到

Depending on the identity provider, the Issuer User ID is a unique value for a given user per application or development account.根据身份提供者,颁发者用户 ID 是每个应用程序或开发帐户的给定用户的唯一值。 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.将 Azure AD B2C 策略配置为具有先前由社交提供者或同一开发帐户中的另一个应用程序分配的相同应用程序 ID。

The assumption here is when you are migrating user from old systems you already have such unique identifier from the social accounts such as Google and Facebook.这里的假设是,当您从旧系统迁移用户时,您已经从社交帐户(例如 Google 和 Facebook)获得了此类unique identifier It can be used in base 64 encoded form.它可以以 base 64 编码形式使用。

It'll also help to understand what is your scenario?它还有助于了解您的情况是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM