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" } } }
Hi GeoffRen,
Can you help me.
I have this issue if i register an Excel run script flow :
The dynamic operation request to API 'excelonlinebusiness' operation 'GetSingleScript' failed with status code 'BadGateway'. Error response: { "error": { "code": 502, "source": "france-001.azure-apim.net", "clientRequestId": "2c0e5648-139e-4407-a40d-ba7d906aab14", "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: 2c0e5648-139e-4407-a40d-ba7d906aab14", "error": { "message": "The server experienced an issue and couldn't complete the request. Please try again in a few moments." }, "source": "excelonline-fs.azconn-fs-001.p.azurewebsites.net" } } }.
Thanks
@GeoffRen I am also having repeated failures with trying to run my excel script from power automate, I can run it directly in excel without any issues:
It seems that your script is timing out. It's difficult to say exactly why without knowing what your script looks like and what the workbook it is running on looks like. For assistance, I'd recommend making a new post with a full repro containing a copy of your script and the workbook it is running on for more help from the wider community as well (you can tag me there too).
We do not have a certificate issue or know of an outage currently. It seems that your issue is that your script file was corrupted somehow. The .osts file corresponding to your script does not seem to be valid JSON. You can try to fix that file manually, or just create a new identical script and that should fix your issue.
@GeoffRen I am getting the same issue as well. Looks like again there is a certificate issue on Microsoft end. Here is the error message i am getting
The dynamic operation request to API 'excelonlinebusiness' operation 'GetSingleScriptV2' failed with status code 'BadGateway'. Error response: { "error": { "code": 502, "source": "uk-001.azure-apim.net", "clientRequestId": "1891f008-1e0a-4915-a79c-ab4a5228f80d", "message": "BadGateway", "innerError": { "status": 502, "message": "The server experienced an issue and couldn't complete the request. Please try again in a few moments.\r\nclientRequestId: 1891f008-1e0a-4915-a79c-ab4a5228f80d", "error": { "message": "The server experienced an issue and couldn't complete the request. Please try again in a few moments." }, "source": "excelonline-ukw.azconn-ukw-001.p.azurewebsites.net" } } }
@GeoffRen I am getting the same issue for several of my flows. Here is one of the errors:
It looks like you are having the same issue as above. Your script seems to be in an invalid state. We usually see this happen when the script file itself was modified manually. Can you recreate the script and try again?
Your script seems to be in an invalid state. We usually see this happen when the script file itself was modified manually. Can you recreate the script and try again?
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2