用户如何从 Microsoft Graph 获取工作令牌?

How can a user get a working token from Microsoft Graph?

我正在申请 Microsoft Teams。

必须获取用户是其直接成员的 Microsoft Teams 中的团队。 如果我使用我在 Active Directory 中注册应用程序时使用的同一电子邮件,那么根据请求将列表获取到 /me/joinedTeams 并不困难。 但是,如果我使用其他人的 Teams 帐户,我会在请求 /me/joinedTeams.

时收到 UnknownError

我注意到在Microsoft Graph中同意和授权后,用户的令牌比我的短。

但是,它适用于其他端点(/me/drive/root)。 根据文档公开权限。

权限:

Directory.Read.All
Directory.ReadWrite.All
email
Files.Read
Files.Read.All
Files.Read.Selected
Group.Read.All
Group.ReadWrite.All
offline_access
openid
profile
Team.ReadBasic.All
TeamsAppInstallation.ReadWriteSelfForChat.All
TeamsAppInstallation.ReadWriteSelfForTeam.All
TeamsAppInstallation.ReadWriteSelfForUser.All
TeamSettings.Read.All
TeamSettings.ReadWrite.All
User.Read
User.Read.All
User.ReadWrite.All

enter image description here

此处出现错误,因为 /me/joinedTeams 不支持个人帐户。看到这个 document.

它适用于 /me/drive/root,因为它支持个人帐户。参见 this document and this document