I'm trying to add an attachment to a mail but I receive the following error :
{
"error": {
"code": "BadRequest",
"message": "Maximum request length exceeded.",
"innerError": {
"request-id": "dab8c18c-a393-45f5-8dc7-af710ec5e45a",
"date": "2015-12-15T19:13:47"
}
}
}
It seems that the problem appears if the file size exceeds 3MB.
I tested to do the same thing with Outlook API and there's no problem with a 22MB file.
@angelgolfer-ms, is this a known issue? Either way, looks like we should add a note in the attachment documentation that the limit is 3MB (I can't find it if it's there).
@scordonnier , thank you for your patience. I got confirmation that at this point, when using the Microsoft Graph endpoint, there is a 4MB limit on the size of a request. Creating an attachment or updating a user photo of size 3MB+ would put one close to that limit.
Thanks for you reply @angelgolfer-ms
Does this limit will be increased/removed in the future, to be aligned with Outlook API ?
The engineering teams are looking into this again. If there is a change, we will post an update. Thank you for raising this issue.
Any update on this? I can see that an endpoint was added to address the API request limit for Drive items. Would the same be possible for attachments?
(Our app supports multiple email providers, and O365 is the only one where we need to limit files to 4Mb because of this API restriction).
@Shreedevi, can you please confirm if the 4MB limit on the size of a REST request is still the restricting factor for attachment size? Thanks.
@quentez , I got confirmation that the 4MB limit is still the restricting factor for attachment size on the Microsoft Graph endpoint.
@angelgolfer-ms Thank you for the update.
Is there a place where you track feature requests where we could add this?
Yes, please add it to the Microsoft Graph page on UserVoice:
https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/category/101632-microsoft-graph-o365-rest-apis
Thank you!
Hey @angelgolfer-ms, is there any other way to send larger attachments? Or can people just not send attachments larger than 4MB in my application no matter what :(
@ArunMSFT , is there an update we can provide regarding creating (and sending) messages with attachments larger than 4MB, using the Microsoft Graph endpoint?
The work to support >4MB attachments is underway and we plan to make a beta version available by end of Dec timeframe. If there is an urgent need before that it would be best to look into the Outlook REST API directly but if waiting is an option, Graph would be the recommended path forward.
Awesome!! Thanks! Is there a way to let me know when it's available?
We will have a blog post for the announcement. The changelog site here: https://developer.microsoft.com/en-us/graph/docs/concepts/changelog always has the latest updates.
Is there a mailing list or something?
@ArunMSFT Any update? I didn't see the beta version actually? Do you guys have a timeline of supporting this for all users?
About relaxing the limit on attachment size, please use issue #3593 for further tracking :-) Cc-ing @svpsiva who is now the program manager for that subject.
@Booligoosh and folks who would like to connect regularly - please join the monthly Microsoft Graph community call that happens the first Tuesday of each month. Please find more information in the recent January blog post.
Thank you for your continued support!
@svpsiva Any update?
please use issue #3593 for further tracking
Most helpful comment
Awesome!! Thanks! Is there a way to let me know when it's available?