cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NeilG
Level: Powered On

SharedMailboxSendEmailV2 with attachments doesn't fail, but doesn't send either if file attachment is large.

Note: I have opened a support ticket for this issue. I am posting here, and will update results here as it might help others.

 

Scenario:

I had a flow that had been working since late 2018 using SharedMailboxSendEmailV2(Preview) and has sent files with pdf attachments as large as 4,409,696 bytes.

 

The other week I had to debug an issue where the flow was failing for 1 user. In the process of debugging/fixing I changed step to use the non-preview version of the V2 call SharedMailboxSendEmailV2 .

 

Now I get the following behavior:

If file size is well less than 4MB (so far the largest file since the change is 3,021,797 bytes), then the flow works.

If the file size is 3,477,063 bytes or greater then the email doesn't send, BUT THE FLOW REPORTS SUCCESS.

 

So the bug:

Flow should fail if the SharedMailboxSendEmailV2 hits the file size limit, then there should be a failure with a helpful message. In my case the flow is successful, but the email is never sent.

 

 

BTW - changing this connector from the Office 365 REST API to the graph API was a horrible choice when the Graph API can't support basicc issues like email messages that fit within the service as shown here: https://docs.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/e... 

In no way is sending an link an acceptable workaround. 

------

 

 

I have provided details such as environment url, flow run urls, and detailed descriptions in a flow support ticket.

 

Thank you.

 

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: SharedMailboxSendEmailV2 with attachments doesn't fail, but doesn't send either if file attachment is large.

 

Hi @NeilG ,

 

Thank you for your feedback.

We have previously reported a similar bug about limitation of the attachment file size, but the issue you made was not included in our test.

There is currently a limit of 4mb on payload size for graph.microsoft.com endpoint.

This is a great finding, is there any response from MS Flow support?

 

Best Regard,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
NeilG
Level: Powered On

Re: SharedMailboxSendEmailV2 with attachments doesn't fail, but doesn't send either if file attachment is large.

Barry,

 

Are you indicating that there are functions beside the send from shared mailbox (v2) call that hit the GraphAPI 4MB (json encoded size) max message limit and have the BUG of instead of failing with a 413 (413 Request Entity Too Large), report status of 200 (success)?

 

Because I can't have my flow do any error handling when the send function reports sucess but actualy fails.

 

See: https://docs.microsoft.com/en-us/outlook/rest/compare-graph

 

To me it seems like the Office 365 Outlook connector should have moved from the depreated Outlook 1.0 REST API to the Outlook 2.0 REST API, not to 100% Graph API.

 

Either that, or the team working on GraphAPI 4MB limit needed to get more resources so that this limitation was increased to handle binary data of at least 25MB  (https://docs.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/e...)

 

 

Eitherway, the flow should not report success (200) when it fails!

 

Note: For those who say "Just send a link to the OneDrive file" -- see my next message for why that is unacceptable.

------

 

Feature differences

There are some features that are currently either only available on the Outlook endpoint, or are only in beta in Microsoft Graph. If your app needs these features, you should access them via the Outlook endpoint.

Note: We are constantly working to incorporate all of the features currently available on the Outlook endpoint into Microsoft Graph. Be sure to check back periodically as this list is updated.

Feature Difference between endpoints
Outlook tasksThe Outlook API provides access to user's tasks. This feature is currently only available in beta in Microsoft Graph.
Attachments over 4MB in sizeMicrosoft Graph cannot create attachments over 4MB in size. Attempts to create an attachment larger than 4MB results in a 413 Request Entity Too Large error.
Rich notificationsThe Outlook API allows developers to request specific fields to be included with the notification payload by using the $select parameter. Microsoft Graph does not support this feature.
Streaming notificationsThe Outlook API supports streaming notifications in preview on the beta endpoint. Microsoft Graph does not support this feature.

 

NeilG
Level: Powered On

Re: SharedMailboxSendEmailV2 with attachments doesn't fail, but doesn't send either if file attachment is large.

Why Microsoft Office 365 Outlook connector should handle large attachments (why Send a Link is not an answer)

 

There are thousands of scenarios where we want automation of email that might deal with messages that have message body and/or message attachments that are larger than the ~3MB limit that the Graph API currently suffers from.

 

Here is a few of the more common scenarios of why the answer "Just send a link" is not acceptable

  1.  We can't control inbound email message body or attachment sizes. The Exchange Online Service description is clear on what the current message size limits are.
    Right now, with the new API calls as of Nov 1 2019, Flow can't process inbound messages if they hit the 4MB (json encoded) size in either the message body or attachment(s).
  2. Using flow to automate non-human interactive processes - such as sending email to a manufacturing floor computer system. That system has no way to "get a link" and may not even have browser, much less be able to authenticate.
  3. Using flow as part of processes that require COPIES of documents at various stages of the work flow.
  4.  Using a non-Microsoft journaling system for regulatory compliance. We need full copies of the email, not the message body + links -- we need the full attachment to be journaled
  5. You might need to work with a company whose security software (firewall, Access Broker, etc) doesn't allow access to OneDrive file links. 

When it comes down to it, YOU ARE BREAKING previously working flows - the replacement calls are NOT equivalent.

 

You can try to argue that businesses should change their processes, that its more efficient to send links rather than the full files. But A) business doesn't change processes over night or even over a year B) Its an opinion and based on situational assumptions, and C) Every business has its it own needs - and if they are using EMAIL you should not be forcing them to use Files-In-The-Cloud.

 

There is a reason that Exchange Online increased attachment and total message size since the BPOS days. LOTS of business is conducted with attachments!

 

Please everyone vote for this uservoice:

https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/3735...

NeilG
Level: Powered On

Re: SharedMailboxSendEmailV2 with attachments doesn't fail, but doesn't send either if file attachment is large.

@v-bacao-msft Did you see that GraphAPI has, as of Oct 22, 2019, a beta fix for the Outlook Graph API 4MB attachment limit?

 

https://developer.microsoft.com/en-us/office/blogs/attaching-large-files-to-outlook-messages-in-micr...

 

Meanwhile, my problem flows are failing with a 502 bad gateway error, but only when attachment size is greater than 4MB Base64 size. 

 

A 502 is better than success, but I would rather get the correct error.. which I think should be 413 per https://docs.microsoft.com/en-us/graph/errors

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,977)