在 Postman 中为 Azure AD B2C 请求访问令牌 [英] Request Access Token in Postman for Azure AD B2C

查看:15
本文介绍了在 Postman 中为 Azure AD B2C 请求访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在

<小时>

我尝试从 Azure 门户中的 Run Now 获取 url 并将其放入 Auth Url 中,但这会产生以下错误:

<小时>

更新

按照克里斯的回答,我现在已经克服了上述错误.我可以登录,但仍然无法获得访问令牌:

<块引用>

AADB2C90085:服务遇到内部错误.请重新验证并重试.相关 ID:45c56d47-4739-465f-8e02-49ba5b3a1b86时间戳:2017-11-16 15:27:52Z

解决方案

使用 @Chris Padgett 的回答,我能够使用 Implicit 授权类型使其工作(无法使用授权代码格兰类型使其工作).

<小时>

授权类型:隐式

回调 URL:我的 B2C 应用中定义的任何 URL

身份验证网址:https://login.microsoftonline.com/te/{tenant}/{policy}/oauth2/v2.0/authorize

客户端 ID:Application ID 来自我的 B2C 应用

范围:https://{tenant}.onmicrosoft.com/{web api app id uri}/{scope name}

客户端认证:随便哪一个都无所谓

How can I request an Access Token in Postman against an Azure AD B2C tenant?


I tried taking the url from Run Now in the Azure portal and putting that in the Auth Url but that produces the following error:


Update

Following Chris's answer, I'm now past the above error. I'm able to sign-in but still can't get an access token:

AADB2C90085: The service has encountered an internal error. Please reauthenticate and try again. Correlation ID: 45c56d47-4739-465f-8e02-49ba5b3a1b86 Timestamp: 2017-11-16 15:27:52Z

解决方案

Using @Chris Padgett's answer, I was able to get it working using the Implicit Grant Type (couldn't get it working w/ Authorization Code Gran Type).


Grant Type: Implicit

Callback URL: any URL defined in my B2C app

Auth URL: https://login.microsoftonline.com/te/{tenant}/{policy}/oauth2/v2.0/authorize

Client ID: Application ID from my B2C app

Scope: https://{tenant}.onmicrosoft.com/{web api app id uri}/{scope name}

Client Authentication: Either one, it didn't matter

这篇关于在 Postman 中为 Azure AD B2C 请求访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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