Pergunta

We have SP2019 on-premise. In the same local network we have a server installed with On-premise Data Gateway. The gateway is sitting behind company proxy. After some configuration change, install is successfully. The Network test result all success. The account I used to signin the gateway is mark@company.com.

Then I login to PowerApp.com with mark@company.com. I want to build my first App start with SharePoint data source (by using our gateway). I can see my gateway. After select my gateway and type in the intranet SharePoint url (e.g. https://mysharepoint.com/) and the login to intranet SharePoint domain (mark@test.com and password) the website fail to retrieve the data source.

It throw me error as below:

{
  "error": {
    "code": 502,
    "source": "asia-001.azure-apim.net",
    "clientRequestId": "7484b03d-b52e-4f16-89ca-d2a8f6fbe7fa",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "Received error payload from gateway service with ID 1533986: Substituted: HttpRequestException:<pi>System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway.\r\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)\r\n   --- End of inner exception stack trace ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayHttpWebProcessor.<>c__DisplayClass0_0.<<ProcessRequest>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayPipelineTelemetry.PipelineTelemetryService.<ExecuteInActivity>d__7`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayHttpWebProcessor.<ProcessRequest>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessorDispatcher.<DispatchImpl>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessorDispatcher.<Dispatch>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.<DeserializeImpl>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.<>c__DisplayClass9_0.<<Deserialize>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayPipelineTelemetry.PipelineTelemetryService.<ExecuteInActivity>d__7`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.<Deserialize>d__9.MoveNext()</pi>.\r\nclientRequestId: 7484b03d-b52e-4f16-89ca-d2a8f6fbe7fa",
      "source": "https://sharepointonline-ea.azconn-ea.p.azurewebsites.net/datasets/httpsxxxxxxxxxxxxxx/tables",
      "errors": []
    }
  }
}

As a control test, I setup a SQL server data source. I am able to create Power App by connecting to my SQL Server on-premise.

Also when I browse https://sharepointonline-ea.azconn-ea.p.azurewebsites.net/ within the gateway server I got Error 403 - Forbidden: Client Certificate Required.

Could you advise how to troubleshoot?

Nenhuma solução correta

Outras dicas

After some research and test, basically 502 error means the on-premise cannot reach the SharePoint webservice by some reason.

For my setup, I found the URL https://mysharepoint.com/ is not resolved correctly in the on-premise gateway server. After adding a new AAM to SharePoint, gateway is able to connect.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top