我正在尝试通过授权方式访问邮递员中的 https://graph.microsoft.com/v1.0/me/joinedTeams ,我得到的回复为
{“错误”:{ “ code”:“未经授权”, “ message”:“未经授权”, “ innerError”:{ “ date”:“ 2020-08-01T09:39:59”, “请求ID”:“ d906f428-ffcd-4821-9153-f9b1976e74c1” }}
如文档中所述,我已经设置了范围Team.ReadBasic.All TeamSettings.Read.All TeamSettings.ReadWrite.All User.Read.All User.ReadWrite.All Directory.Read.All Directory.ReadWrite.All Group.Read.All Group.ReadWrite.All ChannelMessage.Send
In the Enterprise applications, I'm having Microsoft teams installed
I have added the API permissions for type Delegated
但是我可以访问配置文件和组。每当我尝试访问Team API时,总是会收到未授权消息。谁能告诉我,我想念什么?
答案 0 :(得分:1)
我注意到您尚未获得租户的管理员同意。您应该使用Azure AD管理员帐户来执行此操作。 状态将变为“授予{您的租户}”。
您应该参考Get access on behalf of a user来使用身份验证代码流来获取访问令牌。