Share via

PGP + Graph API + 4MB limit

Dev 6 Reputation points
2022-06-16T11:44:37.833+00:00

The 4MB size limit on sending mime messages breaks PGP functionality.

You can attach encrypted + signed messages using separate attachments, but I can't find any workaround for large signed emails that exceed 4MB in size since any change to the mime structure will break PGP signature verification. Any known workarounds? Any other APIs that can be used to send large mime emails?

Why is there such an arbitrary limit?

Microsoft Security | Microsoft Graph
0 comments No comments

2 answers

Sort by: Most helpful
  1. Dev 6 Reputation points
    2022-06-17T06:27:06.167+00:00

    Hi Glen, there is an api endpoint for large attachments that accepts files upto 150MB in size. There should be an equivalent endpoint for large mime emails. There was one in the old outlook api.

    We also can't send using EWS since you can only get access to one resource per access token - so we can't combine using graph + ews.

    SMTP is disabled by a lot of tenants by default - so even if I use that scope, it has a high failure rate.

    EWS is deprecated now and we're trying to migrate to Graph but not being able to send large mime emails is a big drawback.

    Any other ideas?

    Was this answer helpful?


  2. Glen Scales 4,446 Reputation points
    2022-06-16T23:45:03.403+00:00

    4Mb in the maximum size for the JSON document the server will accept, I believe its a standards reason and most JSON parsers have this limitation eg https://www.ibm.com/docs/en/datapower-gateway/10.0.1?topic=20-json-parser-limits

    EWS or SMTP would be the other solutions as they aren't going to have that restriction.

    Was this answer helpful?

    0 comments No comments

Your answer

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