Unable to get teams message attachment content using graph API

524 views Asked by At

I am able to get message attachment information as shown below but unable to download the file content which is stored in share point site.

"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
        }
    ]

I am using the following get call for the above request with auth token

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

I tried the solution posted in https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/200 but I am getting 404 response.

1

There are 1 answers

5
Nikitha-MSFT On

Could you please check Get message API.You will receive the the attachments info in the response as shown belowenter image description here