Forum Discussion

marukosu's avatar
marukosu
Advocate I
2 years ago
Solved

(500): Internal Server Error with SAP B1 Service Layer

Hello everyone!

 

I'm trying to connect to the Service Layer of SAP B1 as follows:

let
url = "https://xyzServer:50000/b1s/v1",

payload =
Json.FromValue(
[ CompanyDB = "xyzDB", UserName = "user", Password = "pass" ]
),

login =
Web.Contents(
url,
[
RelativePath = "Login",
Headers = [#"Content-Type" = "application/json"],
Content = payload
]
),

response = Json.Document( login )
in
response

However, I always receive the following error:

This same connection was tested a while ago on Qlik, and it worked correctly. What could be happening in Power Query?

  • Solved using the Feed OData connector, and adjusting the end of the URL from v1 to v2.

2 Replies

  • amustafa's avatar
    amustafa
    Solution Sage

    Try enabling the necessary firewall rules for Power BI to communicate with SAP Business One (SAP B1), follow these steps:

    1. Power BI Service Endpoints:
    - Power BI relies on specific endpoints for its functionality. Ensure that the following endpoints are reachable from your SAP B1 server:
    - api.powerbi.com (TCP Port 443)
    - \.analysis.windows.net (TCP Port 443)
    - \.pbidedicated.windows.net (TCP Port 443)
    - content.powerapps.com (TCP Port 443)
    - datamart.fabric.microsoft.com or datamart.pbidedicated.windows.net (TCP Port 1433)
    - dc.services.visualstudio.com (TCP Port 443)
    - arc.msn.com (TCP Port 443, optional)
    - nps.onyx.azure.net (TCP Port 443, optional)

    2. Microsoft 365 Authentication and Identity:
    - Power BI depends on Microsoft 365 endpoints for authentication. Ensure connectivity to the following:
    - Microsoft 365 Common and Office Online URLs (N/A)

    3. Portal Access:
    - For general use of Power BI, allow access to:
    - \.powerbi.com (TCP Port 443)

    4. Gateway Administration (Preview):
    - If you're using gateway administration features, allow access to:
    - gatewayadminportal.azure.com (TCP Port 443)

    5. Service Telemetry:
    - To monitor service telemetry, allow access to:
    - dc.services.visualstudio.com (TCP Port 443)

    6. Additional Optional Endpoints:
    - Consider allowing access to optional endpoints for informational messages and NPS surveys.

     

  • Solved using the Feed OData connector, and adjusting the end of the URL from v1 to v2.