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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 502 bad gateway when t...
Power Automate
Unanswered

502 bad gateway when trying to execute an excel script

(0) ShareShare
ReportReport
Posted on by

Hi, I am getting a 502 bad gateway error when trying to execute a script. Tried both the Excel Run Script action as well as the Sharepoint Run Script one, same result. Here is the error:

The dynamic operation request to API 'excelonlinebusiness' operation 'GetSingleScriptV2' failed with status code 'BadGateway'. Error response: { "error": { "code": 502, "source": "europe-002.azure-apim.net", "clientRequestId": "c4db4595-ddc9-4b2b-a7ac-aacdb4478beb", "message": "BadGateway", "innerError": { "status": 502, "message": "The server experienced an issue and couldn't complete the request. Please try again in a few moments. clientRequestId: c4db4595-ddc9-4b2b-a7ac-aacdb4478beb", "error": { "message": "The server experienced an issue and couldn't complete the request. Please try again in a few moments." }, "source": "excelonline-we.azconn-we-003.p.azurewebsites.net" } } }

Categories:
I have the same question (1)
  • GeoffRen Profile Picture
    Microsoft Employee on at

    Can you try recreating the script from scratch from the Automate tab in Excel? I'm seeing that your file may have been corrupted.

  • pwanderson Profile Picture
    2 on at

    I'm quite new to power automate. I'm trying to run a script in an excel document in onde drive for business. The script runs fine in the spreadsheet, 

     

    I have created a flow that is triggered by "For this Row" in another spreadsheet. but when I try to run the script I get a bad gateway. Is this the same issue that others are reporting in this thread?

     
    {
      "error": {
        "code"502,
        "source""flow-apim-msmanaged-na-westus-01.azure-apim.net",
        "clientRequestId""8a710076-d3df-43dc-b7c7-5dcc2b156d95",
        "message""BadGateway",
        "innerError": {
          "message""We were unable to run the script. Please try again.\r\nclientRequestId: 8a710076-d3df-43dc-b7c7-5dcc2b156d95",
          "logs"null
        }
  • Sahil0511 Profile Picture
    on at

    Hi @GeoffRen,

    I'm also facing the same error for "uk-001.azure-apim.net"

    I tried recreating the excel scripts from scratch but it is still giving the same issue.

     

    Please look into this.

    Thanks

  • bfreeman0 Profile Picture
    4 on at

    Having the same issue, is there a service issue?

  • erikrene97 Profile Picture
    8 on at

    Same here except for "europe-002.azure-apim.net", I have also tried recreating the excel scripts from scratch but it is still giving the same issue.

     

    Any update would great.

  • erikrene97 Profile Picture
    8 on at

    Cache Clear, Restart, Rewriting the script, deletion and the reconfiguration of the connector didn't work either.

  • schmitzr Profile Picture
    22 on at

    Error 502 bad gateway with sharepoint script on excel online (business). Where can issues/tickets be opened to MS? The support page is fricking useless.

  • tomkeysers Profile Picture
    9 on at

    I'm having the same all of a sudden since today... Any news on a service outage?

  • GeoffRen Profile Picture
    Microsoft Employee on at

    Sorry to hear you're experiencing this problem. It might be an issue on our side and we have been actively investigating the root cause. Will let you know once it's been addressed. Thanks for your patience!

     

    It would also be helpful for us to help investigate your issue if you post the error you are receiving with any pertinent information (in particular, the clientRequestId) as the OP did.

  • joellasotaPF Profile Picture
    21 on at

    Hi @GeoffRen  

    Please see few clientRequestIds below:

    2902b008-13ad-45f4-a2c6-72ff63ca17cd
    44abbca1-0725-41ee-a089-856c1d281278
    aa9518c9-6301-4314-80fb-775e01f115e9
    All showing 401 Unauthorized

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard