March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello everyone,
I have created a report using power bi desktop (Vesrion January 2021). In order to get the data for this report, I connect to a web API using the provided API key in the header part of the request:
This part works fine and I get the necessary data to work on the Power BI desktop.
When I publish the created report to a Power BI Report Server, as you can see in the following image, there is no way to add the header data which in this case is mandatory to authenticate:
The Authentication part in the Credential section in the above image does not support adding headers data and only accepts Anonymous, Basic, and Windows authentication which are not applicable here (The test fails).
As the data in my report changes regularly and I need to schedule an automatic refresh, the Report Server has to connect to the Web API at the scheduled times in order to get the latest version of the data.
I would appreciate it if you could help me to solve the encountered problem.
Regards
Solved! Go to Solution.
This part of your error message
The remote name could not be resolved
sounds like there is a firewall or proxy or something in your network configuration blocking your server from accessing the remote api source. Or the service account that is running your report server instance does not have permission to access external sites. I suggest you talk to your IT team about this.
This should work if you leave the authentication type as anonymous. The Test button will report an error as it does not know about the apikey header embedded in your M code, it only knows about the url endpoint. But the refresh should still work fine.
I am experincing the same issue as OP. When I try to refresh through Report Server, I get a "Login failed for data source" error. I have set the authentication type as anonymous. Refreshing through PowerBI desktop works fine.
Error details:
Data source error: Login failed for data source ‘API URL HERE’.
SessionID: ID HERE [0] -1055784932: DataSource.Error: The remote name could not be resolved: 'api.smartrecruiters.com'. (API URL HERE). The exception was raised by the IDbCommand interface.
Any ideas? Also would like to hear from OP if they have experienced a similar error as me.
This part of your error message
The remote name could not be resolved
sounds like there is a firewall or proxy or something in your network configuration blocking your server from accessing the remote api source. Or the service account that is running your report server instance does not have permission to access external sites. I suggest you talk to your IT team about this.
I think you're right. Talking to IT, it sounds like outside communication is not allowed for our report server. Thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
5 | |
4 | |
3 | |
3 | |
3 |