我如何使用Azure B2C服务返回的IDP_ACCESS_TOKEN
我已经设置了Azure AD B2C服务,以注册/登录我的用户,并使用了第三方身份提供商Google和Microsoft。成功登录后,我将获得IDP_ACCESS_TOKEN 从B2C服务返回。我可以使用这个令牌直接连接到Google和Microsoft API 正如Azure Docs提到的那样,该令牌由身份提供者发行,并由B2C服务索赔返回。但是IDP_ACCESS_TOKEN似乎并不是有效的访问令牌,并且其中不包含任何索赔。
I have setup a azure ad b2c service to sign up/ sign in my users and have used third party identity providers google and microsoft. After successful logging in, I get idp_access_token
back from b2c service. Can I use this token to directly connect to google and microsoft api
as azure docs mention, this token is issued by identity providers and returned as claims by b2c service. But the idp_access_token doesn't seem to be a valid access token and no claims are included in it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要获得有效的“ IDP_ACCESS_TOKEN”,请检查是否必须在OpenID身份提供商配置的Metaurl中设置“ v2.0”:
我们可能无法编辑已经创建的元数据。 v2.0“ Metaurl。
当用户签名具有身份提供商(例如Google或Facebook)时,您的应用将获得身份提供商的访问令牌,以azure ad b2c令牌传递。 此IDP_ACCESS_TOKEN可以使用IDP_ACCESS_TOKEN,可以致电身份提供商的API em>,例如Facebook Graph api ie;
通常使用嵌入式IDP访问令牌来调用IDP主机
的服务。有关详细信息,请参见通过用户流到Azure Active Directory B2C中的应用程序传递访问令牌。参考: techcommunity.microsoft.com blog
您可以将此Microsoft文档检查到 使用Azure Active Directory B2C 或使用Azure Active Directory B2C < /a>
参考:
To get a valid "idp_access_token", please check if you have to set "v2.0" in the metaurl of the OpenId Identity Provider Configuration:
We maynot be able to edit metadeta url of already created one .So try create new one with "v2.0" in metaurl.
When a user signs with identity provider, like google or Facebook, your app gets the identity provider's access token passed in Azure AD B2C token.This idp_access_token can be used call the identity provider’s API, such as the Facebook Graph API i.e;
Usually the embedded IdP access token is used to call the services that the IdP hosts
. For details see Pass an access token through a user flow to your application in Azure Active Directory B2C.Reference: techcommunity.microsoft.com blog
You can check this microsoft document to Set up sign-up and sign-in with a Facebook account using Azure Active Directory B2C or with a Google account using Azure Active Directory B2C
References: