如何从MS Graph中的私人用户获取完整令牌? [英] How do I get a full token from a private user in MS Graph?

查看:80
本文介绍了如何从MS Graph中的私人用户获取完整令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jwt.io中检查了来自已接收用户的令牌- https://i.imgur.com/S5BzmbS.png 从组织目录中的帐户- https://i.imgur.com/yGq2RM7.png

I check the token from the received user in jwt.io - https://i.imgur.com/S5BzmbS.png From account in organizational directory - https://i.imgur.com/yGq2RM7.png

广告中的权限应用- https://i.imgur.com/oMlqlqx.png

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

User get token by this instructions - https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs

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

The main problem is that apparently because of the token, when sending a request /me/drive/root/children, the private user receives an empty value.

推荐答案

修改 var范围= [" https://graph.microsoft.com/User.Read"]; var范围= [" https://graph.microsoft.com/.default]; 然后,访问令牌将包含所有授予的Microsoft Graph权限.

Then the access token will include all the granted Microsoft Graph permissions.

这篇关于如何从MS Graph中的私人用户获取完整令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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