upload large file graph API 60Mb+ error

jerico bernales 1 Reputation point
2021-06-18T12:51:59.307+00:00

Is it possible to upload more than 60mb (e.g. xxx.pdf (70mb))to MS teams channel? or is it possible to submit 2 PUT request with a chuck data?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,522 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,849 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mamatha-MSFT 161 Reputation points
    2021-06-23T10:58:42.983+00:00

    Hi @jerico bernales - I am able to send 69MB pdf file to Teams channel using following query.

    `POST https://graph.microsoft.com/beta/teams/fbe2bf47-16c8-47cf-b4a5-4b9b187c508b/channels/19:4a95f7d8db4c4e7fae857bcebe0623e6@thread.tacv2/messages

    Content-type: application/json

    {
    "body": {
    "contentType": "html",
    "content": "Here's the latest budget. <attachment id=\"153fa47d-18c9-4179-be08-9879815a9f90\"></attachment>"
    },
    "attachments": [
    {
    "id": "153fa47d-18c9-4179-be08-9879815a9f90",
    "contentType": "reference",
    "contentUrl": "https://m365x987948.sharepoint.com/sites/test/Shared%20Documents/General/test%20doc.docx",
    "name": "Budget.docx"
    }
    ]
    }`

    https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-beta&tabs=http#example-4-send-a-message-with-file-attachment-in-it

    Could you please share the request and error message which you are getting.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.