Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
We have a Power BI connection using a web connector with authentication headers, including a bearer token. It works perfectly in Power BI Desktop but fails after publishing to the service, whether configured within the data gateway or as a cloud source. Despite troubleshooting, we haven't resolved the issue.
The API endpoints work successfully with Postman using the bearer token .
Any guidance or support would be greatly appreciated.
Please find below the error message
Error message :
Data source error: {"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"The underlying connection was closed: An unexpected error occurred on a send."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.ValueError.Detail","detail":{"type":1,"value":"https://XXXX.tempus-resource.com/sg/api/sg/v1/Timesheets/AllTimesheets?detailLevel=ByResourceAndTask..."}},{"code":"Microsoft.Data.Mashup.ValueError.Reason","detail":{"type":1,"value":"DataSource.Error"}}],"exceptionCulprit":1}}} Table: Current Month FTE Hours.
Cluster URI: WABI-US-NORTH-CENTRAL-H-PRIMARY-redirect.analysis.windows.net
Activity ID: c58c00b3-4b0d-4bab-91f3-02f552dfe395
Request ID: 654d79e7-fba3-6d13-900a-b8c7b66d1f02
Time: 2025-04-23 06:27:54Z
Solved! Go to Solution.
Hi the below solutions didnt help . I actually worked with my network team and they are using a third party application that had for some reason put one of these urls in the blocklists and hence i was not able to access the URL from the subnet . The issue is resolved now after the IT / Network team inspected the traffic and whitelisted it since . However i thank all for promptly coming up with suggestions .
Hi @ArjunBS,
We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.
Thank you.
Hi the below solutions didnt help . I actually worked with my network team and they are using a third party application that had for some reason put one of these urls in the blocklists and hence i was not able to access the URL from the subnet . The issue is resolved now after the IT / Network team inspected the traffic and whitelisted it since . However i thank all for promptly coming up with suggestions .
Hi @ArjunBS,
Great to hear the issue got fixed. Please accept your reply as a solution so that other community members with the same issue can find it more easily.
Thank you.
Hi @ArjunBS,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @ArjunBS,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @ArjunBS,
Thank you for reaching out to the Microsoft Fabric Forum Community.
The issue arises because Power BI Desktop and Power BI Service handle web connections differently, especially when it comes to custom headers like the Authorization: Bearer token. While Power BI Desktop allows these headers in Web.Contents() without issue, the Power BI Service does not retain or honor custom headers unless they are part of a supported pattern, such as within a custom data connector.
The specific error you're encountering typically indicates that the Service-side request is missing required authentication headers, causing the API to reject the connection. A recommended and scalable solution is to build a custom Power Query connector which encapsulates the authentication logic securely and works seamlessly with the on-premises gateway.
Make sure the API endpoint supports TLS 1.2, as Power BI Service enforces it and any mismatches can also lead to abrupt connection closures. If the API supports query parameter–based token authentication, that could serve as a short-term workaround, though it comes with security trade-offs.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
50 | |
32 | |
26 | |
26 | |
25 |
User | Count |
---|---|
62 | |
49 | |
30 | |
24 | |
23 |