Forum Discussion
On-premises data gateway 500/502 BadGateway error
Hi All,
I've posted this in the Power Platform community but having no luck. I'm having an issue with running the 'HTTP with Microsoft Entra ID (preauthorized)' connector. The on-premises data gateway is set up and running on a Windows Server 2022. It's region is 'UK South' and is online using a service account. This account is the local admin and the gateway admin of the VM running the data gateway. I have no errors showing on the gateway app itself or through the Gateways panel in Power Platform admin.
When I run my flow, as soon as it gets to the connector with a basic GET command, I receive the following error:
Action 'User_Login' failed: { "error": { "code": 500, "source": "uk-001.azure-apim.net", "clientRequestId": "xxx", "message": "BadGateway", "innerError": { "status": 500, "message": "Received error payload from gateway service with ID 250860: Internal error: userName.\r\nclientRequestId: xxx", "error": { "message": "Received error payload from gateway service with ID 250860: Internal error: userName." }, "source": "gatewayconnector-ukw.azconn-ukw-001.p.azurewebsites.net" } } }
The error logs from the GatewayErrors.log file show the following:
DM.EnterpriseGateway Error: 0 : 2024-09-20T14:46:03.7854822Z DM.EnterpriseGateway e2c65b3d-cd36-474c-b31c-76874e8ad108 00000000-0000-0000-0000-000000000000 MDSR 00000000-0000-0000-0000-000000000000 94b98e5c-7c83-4256-9197-7ab195efe5fe 83cdf9a7-620b-4088-916a-a47d3970d9c9 4C1EF73E [DM.GatewayCore] Error processing request: [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.RuntimeCheckFailedException: Internal error: userName
TemplateMessage: A runtime check error occurred:
GatewayPipelineErrorCode=DM_GWPipeline_Gateway_RuntimeCheckFailedError
GatewayVersion=
FailureMessage=
([0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.RuntimeCheckFailedException.StackTrace:)
at Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.Internal.RuntimeChecks.Fail(String message)
at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.ImpersonatorHelper.ParseUserName(String userName, String& domain, String& user)
at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayHttpWebProcessor.GetCredentialCache(String credential, IGatewayConfigurationStore configurationStore, Uri uri)
at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayHttpWebProcessor.AddProperties(Dictionary`2 properties, HttpClient httpclient, HttpClientHandler httpClientHandler, HttpRequestMessage httpRequest, GatewaySerializationContext responseContext)
Any ideas as to why this is happening? It can't be trusted sites because the VM already connects to both 'gatewayconnector-ukw.azconn-ukw-001.p.azurewebsites.net' and 'uk-001.azure-apim.net' when I ping them.
N.B. We have a 'West Europe' on-premises data gateway is on a Windows Server 2019 that works perfectly fine on a different VM, but this 'UK South' one doesn't seem to work.
Thanks,
Matt
The connection in Power Automate wasn't storing the credentials after it had been edited, therefore as soon as I added in the username and password for 'Windows' credentials it started working.
2 Replies
- lbendlin
Super User
If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues . - MThornicroftRegular Visitor
The connection in Power Automate wasn't storing the credentials after it had been edited, therefore as soon as I added in the username and password for 'Windows' credentials it started working.