AS2 MDN Errors: Authentication Failed, Decryption Failed
Aug 29, 2026
Aug 29, 2026
Convert a purchase order to Excel, CSV, or JSON
Submit your purchase orders
Drop documents here, or click to file
Up to 50 files per batch
Uploading...
An AS2 MDN is a transport receipt, not a business acceptance. A disposition of processed means your trading partner decrypted the message, verified the signature and handed the payload to their system. It says nothing about whether the purchase order inside was valid or whether their ERP accepted a single line of it. Every AS2 error you will actually chase is written in the disposition modifier: authentication-failed, decryption-failed, integrity-check-failed, unexpected-processing-error, insufficient-message-security or decompression-failed.
Last updated August 2026.
This is a reference for the AS2 MDN failures that stop purchase orders moving between trading partners, written against RFC 4130, the specification that defines AS2 itself. The codes are short and the wording is terse, which is why so much AS2 troubleshooting starts in the wrong place. Below is what each one means, what usually causes it in practice, and the order to check things in.
MDN stands for Message Disposition Notification. When you POST an AS2 message, the receiver returns an MDN describing what happened to it. That MDN has three useful parts: the disposition field, the Received-content-MIC, and the reference back to your original Message-ID. Everything else is envelope.
The critical thing to understand up front is that the MDN reports on message handling, not on the business document. The receiver decrypted your file, checked your signature, confirmed the content was not altered in transit, and put the payload somewhere. Whether their order management system then accepted your 850 is a separate question, answered by a separate document.
The disposition field is assembled from a mode, a type, and an optional modifier. Read it left to right.
| Part | Values | What it tells you |
|---|---|---|
| Action mode | automatic-action or manual-action | Whether software or a person decided the disposition. Almost always automatic-action. |
| Sending mode | MDN-sent-automatically or MDN-sent-manually | Whether the MDN itself was generated automatically. |
| Disposition type | processed or failed | The headline result. These two mean genuinely different things, see below. |
| Modifier | error: <code> or warning: <code> | The actual reason. This is the part worth alerting on. |
A clean receipt looks like automatic-action/MDN-sent-automatically; processed with no modifier at all. Anything after a semicolon and the word error is a failure you need to act on.
RFC 4130 defines a closed set of disposition modifiers. There are six error codes, and in fifteen years of AS2 deployments the practical causes have not changed much.
| Modifier | Literal meaning | What it almost always is in practice |
|---|---|---|
error: authentication-failed | The receiver could not authenticate the sender | Your signing certificate is not the one they have on file, or it expired, or you are signing with a cert they never imported. Also fires when you send unsigned to a partner who requires signing. |
error: decryption-failed | The receiver could not decrypt the payload | You encrypted with the wrong public key. Usually the partner rotated their certificate and you are still using the old one, or you swapped their signing and encryption certs. |
error: integrity-check-failed | The computed MIC did not match | A MIC mismatch. Algorithm disagreement, a Content-Transfer-Encoding difference, or something genuinely rewrote the payload in transit. Detail below. |
error: unexpected-processing-error | Catch-all | The receiver threw an exception it did not classify. Almost never actionable from your side alone. Ask them for their log entry with your Message-ID. |
error: insufficient-message-security | Security requirements not met | You sent without encryption, without signing, or with a weaker algorithm than the trading partner agreement requires. |
error: decompression-failed | Compression could not be reversed | You compressed and they do not support it, or the compression algorithm does not match what was negotiated. |
There is also a warning form. processed/warning: authentication-failed, processing continued means the receiver could not verify you but processed the message anyway. Treat that as a failure that has not happened yet: the partner is being lenient, and the day they tighten their configuration your feed stops.
An integrity-check-failed means the MIC your side computed over the outbound payload does not match the Received-content-MIC the partner returned. There are three real causes, and only one of them is the scary one.
The first and most common is an algorithm mismatch. You requested a receipt with a specific digest algorithm via the Disposition-notification-options header, and the partner computed the MIC with a different one. SHA-1 against SHA-256 is the classic pairing, usually left over from a half finished migration. Microsoft documents this exact failure for BizTalk: the algorithm in the signed-receipt-micalg header of the original message has to match what the receiving side is configured to use.
The second is a Content-Transfer-Encoding difference. The MIC is computed over the MIME part including its headers, so if one side includes a Content-Transfer-Encoding: 7bit header and the other omits it entirely, or one uses binary where the other uses base64, the digests differ over byte-identical business data. This one is maddening precisely because the payload is fine and the file arrives intact.
The third is that something actually modified the payload. A proxy, a content filter or a gateway that rewrites MIME parts will break the MIC legitimately. If the first two check out and the mismatch is consistent, look at what sits between the two endpoints.
This distinction gets flattened by almost every integration dashboard, and it costs troubleshooting time. RFC 4130 is specific: the failed disposition type must be used when a failure prevents the proper generation of an MDN at all. processed/error means the receiver understood the message enough to process it and then hit a problem with it.
| Disposition | Means | Examples from the spec |
|---|---|---|
processed | Handled successfully | No modifier at all |
processed/error: ... | Understood, then rejected on content or security | authentication-failed, decryption-failed, integrity-check-failed |
failed/failure: ... | Could not be processed as an AS2 message | unsupported format, unsupported MIC-algorithms |
The practical difference: a processed/error is usually a certificate or configuration mismatch between two working AS2 systems. A failed/failure means the two sides do not agree on what AS2 even looks like, which is a setup conversation, not a retry.
Because they are different layers, and RFC 4130 requires it. The specification states directly that even when the disposition of the data was an error condition at the authentication, decryption or other higher level, the HTTP status code should indicate success at the HTTP level.
This is the single most expensive misreading in AS2 operations. An HTTP 200 means the POST reached the endpoint and the endpoint replied. It carries no information about whether your purchase order was accepted, decrypted, or even readable. Any monitoring that alerts on HTTP status alone will report a perfectly healthy AS2 channel while every message in it fails authentication.
If you have ever seen this pattern in EDI, it is the same shape as a 997 that returns AK901 = A. The acknowledgment confirms syntax, not business acceptance. The EDI 997 error code reference covers that layer, and the two together are how you tell transport problems from document problems.
No. A processed MDN means the receiver decrypted your message, verified your signature and handed the payload to whatever comes next. It is signed proof of receipt, and with a matching MIC it gives you non-repudiation, which is genuinely valuable. It is not proof that anything read the document.
The chain for an outbound purchase order looks like this, and each step can fail independently while the one before it reports success:
| Layer | Confirmed by | What a success means |
|---|---|---|
| Transport | HTTP 200 | The endpoint is reachable and answered |
| AS2 | MDN with disposition processed | Decrypted, signature verified, payload handed off |
| Syntax | 997 with AK901 = A | The X12 structure parsed |
| Business | 855 acknowledgment | The supplier actually confirmed the order line by line |
Only the last row tells you anything about your order. If you are tracking whether orders are being fulfilled, the 855 is the document that answers it, and the EDI 855 acknowledgment converter lays out the line status codes it carries.
| Synchronous MDN | Asynchronous MDN | |
|---|---|---|
| How it returns | On the same HTTP connection as your POST | On a separate connection the receiver opens back to you |
| You need | Nothing extra | A reachable inbound URL, and a firewall that permits it |
| Fails as | A timeout on your POST | Silence. Your POST succeeds and the MDN simply never arrives |
| Best for | Low latency, small files | Large files and receivers who process on a queue |
The failure signature of asynchronous MDN is worth internalizing: everything on your side looks perfect. The message went out, the HTTP call returned 200, and there is no error anywhere. The MDN is missing because the partner tried to deliver it to a URL that is unreachable, or to an address you changed and did not tell them about. If MDNs stop arriving from one partner and only one, check the return URL before you touch certificates.
A signed MDN is a multipart/signed body with the MDN as the first part and an application/pkcs7-signature as the second. An unsigned MDN is a plain multipart/report. Only a signed MDN gives you non-repudiation of receipt, because only a signed MDN cryptographically ties the returned MIC to the partner identity.
If your trading partner agreement mentions non-repudiation and your MDNs are coming back unsigned, you do not have what the agreement says you have. You request signing through the Disposition-notification-options header, which is also where you state which digest algorithms you will accept.
A missing MDN is not a slow MDN, and waiting longer rarely helps. Work through these in order.
| Check | What it rules out |
|---|---|
| Did the POST return HTTP 200? | If not, this is a network, TLS or URL problem and AS2 never started |
| Are you configured for asynchronous MDN? | If yes, the problem is almost certainly your inbound return URL, not the message |
| Did you request an MDN at all? | Disposition-notification-to has to be present. Without it the receiver is not obliged to send one |
| Is the partner processing on a schedule? | Some receivers batch. A twenty minute gap can be normal for that partner and alarming for every other one |
| Ask the partner to search their log by your Message-ID | This is the fastest way to find out whether they ever received it |
Yes, and the specification is unusually precise about how. A Message-ID on a POST can be reused if and only if all of the content, including the original Date, is identical. If your client failed to read the server response, you should repeat the POST with identical content and the same Message-ID. Receiving systems are expected to handle this: on a repeated Message-ID they should resend the MIME reply body they sent the first time.
The operational consequence matters. When a partner reports a duplicate purchase order, the first question is whether the retransmission used the same Message-ID or a new one. Same Message-ID is a legitimate retry that their system should have deduplicated. A new Message-ID with the same PO number is a genuine duplicate submission, and that is your side to fix.
Most AS2 problems are certificate problems wearing a different hat. Checking in this order avoids the usual detour through packet captures.
| Order | Check | Because |
|---|---|---|
| 1 | Read the disposition modifier, not the HTTP status | The HTTP layer is required to report success regardless |
| 2 | Check certificate expiry on both sides | Expiry is the most common single cause, and it fails on a date, not on a change |
| 3 | Confirm which cert is used for which purpose | Signing and encryption certificates get swapped constantly, producing decryption-failed |
| 4 | Compare the MIC algorithm both sides expect | This is the whole of integrity-check-failed in most cases |
| 5 | Confirm the partner has your current public cert | They may have imported an older one, so your side looks correct and theirs does not |
| 6 | Only then look at the payload | If the MDN says authentication-failed, the payload was never the problem |
Step two deserves a calendar entry rather than a troubleshooting session. AS2 certificates expire on a known date and take down a working channel with no warning and no code change, and each trading partner has its own. Teams that run AS2 with more than a handful of partners keep a per partner record of certificate expiry, contact and endpoint, alongside the commercial supplier details, because the technical relationship and the commercial one fail in the same place. If that list is thin because the partner set is small, and the reason it is small is the onboarding effort, it is worth knowing that finding and qualifying new suppliers is now much less of a project than wiring one up.
AS2 is one channel and it is rarely the only one. The partners big enough to run AS2 are usually a minority of the customer or supplier list, and everyone else emails a PDF. Those orders carry exactly the same fields and none of the transport machinery, which is why they end up being keyed by hand.
Lining the two channels up on the same columns is the cheap win: purchase order number, order date, requested date, ship to, vendor, then one row per item. Our EDI to Excel converter guide covers how the X12 side flattens into those columns, including how the ISA header declares the delimiters, and PurchaseOrders reads the document side into the identical layout. To be clear about scope, PurchaseOrders is not an AS2 client and not an EDI translator, and it will not diagnose an MDN. It handles the orders that never had an MDN in the first place.
| Symptom | Most likely cause |
|---|---|
authentication-failed | Wrong, expired or never-imported signing certificate |
decryption-failed | Encrypted with a stale or wrong partner public key |
integrity-check-failed | MIC algorithm mismatch, or a Content-Transfer-Encoding difference |
insufficient-message-security | Sent unsigned, unencrypted, or with a weaker algorithm than agreed |
decompression-failed | Compression used that the partner does not support |
unexpected-processing-error | Receiver-side exception. Get their log entry for your Message-ID |
failed/failure: ... | Format or algorithm the receiver cannot handle at all |
| No MDN, HTTP 200 | Asynchronous MDN return URL unreachable |
| MDN processed, order not fulfilled | Normal. Check the 997 for syntax and the 855 for business acceptance |
Stop retyping purchase orders
Upload a PDF, scan, or photo of any PO and get clean Excel, CSV, or JSON line items in seconds.
Try it free25 pages free. No credit card required.