使用图形 API 创建 Azure AD B2C 社交帐户 [英] Creating Azure AD B2C Social Account using graph API

查看:13
本文介绍了使用图形 API 创建 Azure AD B2C 社交帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 google 和 facebook 添加为我的 Azure AD B2C 租户的身份提供者.现在我想使用 azure ad graph api 为 google 和 facebook 创建社交用户.在 api 文档中提到 "userIdentities" 是必需的属性,它必须具有子属性 "issuer" 和 "issuerUserId" .对于颁发者",很清楚应该是什么值,但我无法找到如何为 identityProvider 获取issuerUserId".它被描述为社交身份提供者使用的唯一用户标识符",之前我认为它对于身份提供者来说是唯一的,但在尝试时却不是.需要为同一身份提供者的不同用户传递不同的值.我经历了 https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations ,所以我认为它与用户属性有关,但仍不确定如何生成值以传递 api 调用?或者任何随机值都可以?

I have added google and facebook as Identity Provider for my Azure AD B2C tenant . Now I want to create social users for both google and facebook using azure ad graph api . In api documentation it is mentioned that "userIdentities" is required attribute which is having to sub attributes "issuer" and "issuerUserId" . for "issuer" it is quite clear what should be the value , but am not able to find how to get "issuerUserId" for identityProvider. 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 ? Or any random value is ok?

推荐答案

我假设您指的是 用户迁移 这里.文档提到

I assume you are referring to the documentation for user migration here. The documentation mentions

根据身份提供者,颁发者用户 ID 是唯一的每个应用程序或开发帐户的给定用户的值.使用相同的应用程序 ID 配置 Azure AD B2C 策略先前由社交提供者或其他应用程序分配在同一个开发帐户中.

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 等社交帐户的此类唯一标识符.它可以以base 64编码形式使用.

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. It can be used in base 64 encoded form.

这也有助于了解您的方案是什么?

这篇关于使用图形 API 创建 Azure AD B2C 社交帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆