簡體   English   中英

MS Teams:無法使用應用程序令牌通過 Graph API 獲取頻道消息

[英]MS Teams: can not fetch channel messages with Graph API using an application token

我創建了一個測試應用程序,它請求MS 團隊管理員adminconsent具有以下范圍

openid offline_access channelmessage.read.group channelmessage.read.all chat.read chat.readbasic chat.readwrite user.read.all channel.readbasic.all directory.read.all group.read.all groupmember.read.all organization.read.all people.read.all presence.read.all team.readbasic.all

我正在使用應用程序令牌來獲取 ms 團隊組織數據,例如用戶、頻道、團隊等。我已經設法使用 Graph API 獲取組織的用戶、頻道、團隊數據,但是當我嘗試使用

https://graph.microsoft.com/v1.0/teams/team_id/channels/channel_id/messages

我收到以下錯誤:

{
  "error": {
    "code": "UnknownError",
    "message": "",
    "innerError": {
      "date": "2021-03-03T22:23:47",
      "request-id": "a279044a-ab9e-4c18-af71-5a65ea7cee86",
      "client-request-id": "a279044a-ab9e-4c18-af71-5a65ea7cee86"
    }
  }
}

使用應用程序權限時,您必須請求訪問權限。有關詳細信息,請參閱 Microsoft Teams 中受保護的 API

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM