如何从 MS Graph 中的私人用户获取完整令牌?

2024-03-30

我检查 jwt.io 中收到的用户的令牌 -https://i.stack.imgur.com/03OUD.png https://i.stack.imgur.com/03OUD.png来自组织目录中的帐户 -https://i.stack.imgur.com/lXf2e.png https://i.stack.imgur.com/lXf2e.png

AD 中的权限应用程序 -https://i.stack.imgur.com/ekdpv.png https://i.stack.imgur.com/ekdpv.png

用户通过此说明获取令牌 -https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs

主要问题显然是由于令牌的原因,在发送请求时/me/drive/root/children,私人用户收到一个空值。


Modify var scopes = ["https://graph.microsoft.com/User.Read"]; to var scopes = ["https://graph.microsoft.com/.default"]; in 这条线 https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs/blob/33e7cc1fd22d3b2db2b842e91318f7d99f96972c/src/tabs.js#L50.

然后,访问令牌将包含所有授予的 Microsoft Graph 权限。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何从 MS Graph 中的私人用户获取完整令牌? 的相关文章

随机推荐