我正在尝试从我们的策略生成访问令牌,但我收到此错误。
POST /{tenant}/oauth2/token?p=B2C_1A_SignUpOrSignInWithAAD HTTP/1.1
Host: login.microsoftonline.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
grant_type=client_credentials&client_id={client_id}&resource=https%3A%2F%2F{app_url}&client_secret={client_secret}
这是一个邮递员样本请求
POST /{tenant}/oauth2/token?api-version=1.0
... same as above
但如果我不使用我们的自定义政策并且直接转到B2C租户
,它可以正常工作{{1}}
我们的自定义政策中是否缺少某些内容?
答案 0 :(得分:2)
B2C不支持客户端凭据流。其他详细信息为here。在这里Daemons/server-side apps。
但如果我不使用自定义政策
,它可以正常工作
这是因为您从Azure AD获取令牌,而不是B2C。