Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
When adding the API https://api.mktzap.com.br/company/:company_id/historycontact to my On‑premises Data Gateway, I received the following error:
Cannot refresh connection credentials. Invalid connection credentials.
Details: TIFGVTN-FILE: The credentials provided for the Web source are invalid. (Source at https://api.mktzap.com.br/company/3844/historycontact .)
Please have this information on hand if you decide to open a support ticket: Session ID: 58c075f4-8bf0-4050-a8b1-d603659a3872; RequestId: 510de280-d8c3-4798-a149-e3bdadf0ee3b; Cluster URI: https://api.powerbi.com ; Status Code: 400; Time: Tue Apr 22 2025 08:40:20 GMT-0300 (Brasilia Standard Time).
However, when I added a different endpoint (https://api.mktzap.com.br/company-channels/:company_id ) using the exact same settings, I had no issues.
Here is the public API documentation I’m using: https://apidoc.mktzap.com.br/
How can I add the /company/:company_id/historycontact endpoint to the gateway so that I can successfully refresh my reports?
Solved! Go to Solution.
Power BI Gateway Data Refresh Issue Resolution
Troubleshooting Steps
During a support call with Microsoft, assistance was provided and various tests were conducted to diagnose the issue.
The solution involved creating a Generation 1 (Gen1) dataflow in Power BI. In this dataflow, a table was created to store the token generation link.
The M code used in Power Query in Power BI Desktop was copied and pasted into the dataflow to enable data retrieval via the alternate link (this alternate link had been preventing the on-premises data gateway from refreshing data in the Power BI Service).
Once the dataflow connection was added in the on-premises data gateway, the Power BI Service scheduled refresh was able to update the data successfully.
Hi ihavequestionto,
Thank you for the update and sharing your insights and approach in resolving the issue.
We kindly request you to mark your response as the accepted solution, as this will help other community members find answers to similar challenges more efficiently.Please continue leveraging the Fabric Community for any further assistance with your queries.
Thank you.
Hi ihavequestionto,
We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.
If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.
Thank you.
Power BI Gateway Data Refresh Issue Resolution
Troubleshooting Steps
During a support call with Microsoft, assistance was provided and various tests were conducted to diagnose the issue.
The solution involved creating a Generation 1 (Gen1) dataflow in Power BI. In this dataflow, a table was created to store the token generation link.
The M code used in Power Query in Power BI Desktop was copied and pasted into the dataflow to enable data retrieval via the alternate link (this alternate link had been preventing the on-premises data gateway from refreshing data in the Power BI Service).
Once the dataflow connection was added in the on-premises data gateway, the Power BI Service scheduled refresh was able to update the data successfully.
Hi ihavequestionto,
We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.
If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.
Thank you.
Hello, unfortunately I haven’t been able to run the tests yet because of work, but I am extremely grateful for the response. And yes, I will let you know after I complete the tests.
Hi ihavequestionto,
We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.
If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.
Thank you.
Thankyou, @lbendlin, for your response.
Hi ihavequestionto,
We appreciate your inquiry submitted through the Microsoft Fabric Community Forum.
As per my understanding, the issue arises because Power BI Service and Gateway require a valid and reachable Base URL during data refresh. In your case, accessing only api.mktzap.com.br/ returns a "404 Not Found" error, which leads to the gateway authentication failure. While Power BI Desktop may sometimes handle this scenario more leniently, the Service necessitates a successful connection even to the base URL.
Kindly follow the steps below, which may help to resolve the issue:
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. Your support will be beneficial to other community members encountering similar queries.
Thank you.
there is no need to add the historycontact endpoint. Implement a custom action in your connector that adds it as a relative parameter.
But how do I do this?
This API only requires these two parameters:
Authorization: Company access token (Bearer token)
x-page (optional): Page number to return
Sorry, I thought you were using a custom connector.
Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1
So it works in Power BI Desktop, but when adding this link to the gateway, in the Power BI Service it fails — it doesn’t allow me to add it and always returns an error when configuring the connection.
what is the error message?
Using RelativePath, now the connection I’m trying to create is for this link: https://api.mktzap.com.br/.
When connecting as Anonymous and setting Privacy level to None, the following error is returned:
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 |
---|---|
53 | |
23 | |
22 | |
20 | |
18 |
User | Count |
---|---|
46 | |
21 | |
20 | |
20 | |
18 |