简体   繁体   English

将自定义声明添加到 azure b2c 客户端凭据流

[英]Add custom claims to azure b2c client credentials flow

I have configured b2c as an Authorization Server for client credentials flow, I would like to add a claim to the token, so I could send it to the backend service in APIM using policy.我已将 b2c 配置为客户端凭据流的授权服务器,我想向令牌添加声明,因此我可以使用策略将其发送到 APIM 中的后端服务。 But I could not find a way to add this extra claim to the token so I could use it on the APIM.但是我找不到将这个额外声明添加到令牌的方法,因此我可以在 APIM 上使用它。 Note: it was possible using Authorization Code flow, but the claims are not being passed through the request when using client credentials.注意:可以使用授权代码流,但在使用客户端凭据时,声明不会通过请求传递。

Is there a way for achieving that?有没有办法实现这一目标?

You cannot do claims customization with Azure AD client_credential flow .您不能使用 Azure AD client_credential flow进行声明自定义。 We will release Azure AD B2C client credential flow, which will allow claims customization using a custom policy, similar to authorization code flow, in the future.我们将在未来发布 Azure AD B2C 客户端凭证流,这将允许使用自定义策略自定义声明,类似于授权代码流。

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

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