New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4MB total size of each REST request #18
Comments
I just found this tiny bit of information out --- this makes graph useless for sending attachments --- Is there a way to change this or work around this? Wonder if I could just somehow use outlook api instead of graph to send? Much appreciated, Tim: |
Can you ask if going through the effort creating an Outlook REST endpoint, would that have any conflicts with using "Microsoft.Graph" library; I guess the library Microsoft.Office365.OutlookServices-V2.0. |
Hi Tim. As you noted, Microsoft Graph currently has a 4MB limit. If you need to send larger file attachments, you could use the Outlook REST API, which has a limit of 150MB. I'm not very familiar with Outlook development but this tutorial should help. If your scenario depends on sending larger attachments and you're only using Outlook services, this might be your best option for now. If you want to use both the Outlook REST endpoint and the Microsoft Graph endpoint, they require different access tokens so you'd need to obtain them separately. If you want to use Microsoft Graph only, one workaround is to upload the file to OneDrive and then provide a sharing link in the message. Here's an UploadLargeFile C#/UWP snippet that you can base your file-upload method on. |
Thank you for the feedback - it is appreciated. Tim: |
I would like to inquire if you have a sample of this One Drive "sharing" link --- Many thanks, Tim: |
Here's the docs that describe sharing links and options for creating and using them. This test snippet in the client library creates an edit sharing link using the item path. Or you can use the item id that's returned when you upload the file. This snippet uses the item id to create a view sharing link and then just gets the link URL from the returned Permission:
|
Hi @twcarnahan . Closing this issue. Please reopen if you are still having problems. Thanks! |
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/message_post_attachments
Since there is currently a limit of 4MB on the total size of each REST request, this limits the size of the attachment you can add to under 4MB.
The text was updated successfully, but these errors were encountered: