无法使用图形API获取团队消息附件内容

时间:2020-10-01 05:37:29

标签: microsoft-graph-api microsoft-teams microsoft-graph-teams

我能够获得如下所示的邮件附件信息,但是无法下载共享点站点中存储的文件内容。

"attachments": [
        {
            "id": "fc323b65-2cee-48d9-9574-0e26eb74e9bb",
            "contentType": "reference",
            "contentUrl": "https://otdeveloper.sharepoint.com/sites/Test/Shared Documents/General/1Ex.txt",
            "content": null,
            "name": "1Ex.txt",
            "thumbnailUrl": null
        }
    ]

我正在对带有身份验证令牌的上述请求使用以下get调用

GET https://graph.microsoft.com/beta/groups/{{TeamId}}/drive/root:/Test/Shared Documents/General/1Ex.txt:/content

我尝试过发布的解决方案 https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/200 但我收到404响应。

1 个答案:

答案 0 :(得分:0)

请检查Get message API。您将在响应中收到附件信息,如下所示enter image description here