使用来宾用户时,在jwt令牌中缺少goup声明 [英] missing goup claim in jwt token when using guest user

查看:67
本文介绍了使用来宾用户时,在jwt令牌中缺少goup声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在azure广告中创建了一个应用程序,创建了几个安全组。知道应用程序中知道每个组ID(dotnet核心)

I created an application in azure ad created several security groups. know every group id is know in the application (dotnet core)

例如:

有3位用户

< img alt ="ad users"src ="https://social.msdn.microsoft.com/Forums/getfile/1417541">

当我使用bart登录时我有群组声明包含在jwt令牌中。

when i login using bart i have the group claims included in the jwt token.

当我使用dries登录时,这些组不包括在内,干嘛正在使用相同的组和应用程序,唯一的区别是我能看到干涸是访客用户。

when i login with dries the groups are not included, dries is using teh same groups and application the only difference i can see is that dries is a guest user.

我是否需要启用某些功能,以便应用程序同时接收访客用户的组ID。

do i need to enable something so the application receives the group id's for guest users as well.

-Bart

推荐答案

这是设计时使用隐式授权流程,无论"groupMembershipClaims"是什么?在清单中设置。这是为了避免超过浏览器的URL长度限制,因为令牌返回
作为URI片段。因此,在四个用户组成员资格之后或多或少,您将得到"hasgroups:true"。在令牌中。您可以做的是单独调用Graph API以查询用户的组成员身份。或者您可以使用Passport或类似的方式获取令牌服务器
。 


这篇关于使用来宾用户时,在jwt令牌中缺少goup声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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