web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / BadGateway when trying...
Power Automate
Suggested Answer

BadGateway when trying to send approval with attachment

(0) ShareShare
ReportReport
Posted on by 103
Hi, Does anybody help me why I can't send approval with attachment.
It works fine without the attachment, but when I try to attach it, the flow freezes for 10 min and gives an error at the end.
"error": {
        "code": 502,
        "source": "flow-apim-europe-002-westeurope-01.azure-apim.net",
        "clientRequestId": "8841d657-6f8b-42c1-b64c-80db7d93e547",
        "message": "BadGateway",
        "innerError": {
            "error": {
                "code": "XrmApiServerError",
                "message": "Request to XRM API failed with server error: 'Message: An error occurred in MoveAttachmentToAzureDataLake: Logic for msdyn_flow_approval entity storage is not
                            implemented
\nCode: 0x80040265\nInnerError: '. The tracking Id is '8841d657-6f8b-42c1-b64c-80db7d93e547'."
            }
        }
    }
I really need help with this.
(docx size 16k)

Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at
    Hi,

    1) Avoid attachments in the Approval connector

    Instead of using the built-in attachment field, host the file elsewhere (e.g., SharePoint) and provide a link in the approval description.

    Example:

    • Upload your file to SharePoint in a known library.

    • Use Get file content and Create sharing link for a file or folder.

    • In the Approval Details field, put something like:

      Please review this document:
      [
      Discount Approval Steps.docx](https://yourtenant.sharepoint.com/sites/...)

    •  

    This method is fully supported and very reliable.

     

    2) Use adaptive cards for approval

    If you absolutely must embed attachments, consider switching to Teams Adaptive Cards approvals, where you can include:

    • Rich card content

    • Links

    • Even thumbnails

    This approach requires building the card JSON and sending via Post an adaptive card and wait for response, but avoids the problematic backend entity.

    3) Contact Microsoft Support

    If your business process requires official attachment support in the Approval connector:

    • Open a support ticket with Microsoft referencing:

      XrmApiServerError in MoveAttachmentToAzureDataLake
      Entity: msdyn_flow_approval
      Code: 0x80040265
    • Ask them to confirm whether your environment supports attachments.

    • If not, request provisioning or migration guidance.

     Be prepared for them to tell you that attachment support is still in partial rollout.

     

    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard