01-16-2019 02:34 PM
I have built a PBI report on PBI Desktop using SQL database and Web as data sources.
The Web source is used to call http://useragentstring.com and the report passes user agent values in a table to extract user agent-related data (via Invoked Function)
Source = Json.Document(Web.Contents("http://useragentstring.com/?uas="&userAgent_URLEncoded&"&getJSON=all")),
All work fine in PBI Desktop - refreshing the report works there. However, it does not work when I publish the report to on-premise PBI Report Server and run scheduled referesh.
The error is:
SessionID: f327bfa4-fb1c-4662-ab33-a1340c81e00f  -1055784932: Credentials are required to connect to the Web source. (Source at http://useragentstring.com/.). The exception was raised by the IDbCommand interface.  -1055129594: The current operation was cancelled because another operation in the transaction failed.  -1055784932: The command has been canceled.. The exception was raised by the IDbCommand interface.
If I go to Data Sources on the left hand side, it only shows the SQL data source there and I have authenticated it using a service account successfully.
The Web Source does not appear in this section.
When I go to the PBI Desktop > Edit Queries > Data Source Settings, under "Data sources in current file", it only shows the SQL source there, though there is a warning above the buttons saying "Some data sources may not be listed because of hand-authored queries". Not sure what this warning is for and if it is relevant to this issue.
If I go to PBI Desktop > Edit Queries > Data Source Settings, under "Global permissions", I can see http://useragentstring.com/ there and if I click on Edit Permissions, the Credentials type is Anonymous with Privacy Level = None.
Not sure why http://useragentstring.com/ is on "Global permissions" not in "Data sources in current file".
Can this be why the scheduled refresh does not work because the permission to that URL is not explictely configured in the file?
If so, how can I add this data source to "Data sources in current file" section?
P.S. If there is a better (and free) way to extract useful data (e.g. OS type, OS version, browser info, etc.) from given user agent values, please let me know also.
Solved! Go to Solution.
01-20-2019 04:13 PM
01-18-2019 06:12 AM
I have the same issue.
I'm also using a lot of generated web queries.
For some of them passing the credential in the http header combined with an anonymous authentication work.
Unfortunately most of my generated web content call are getting the data from SharePoint on premise.
The Data Source authentication on Power BI report server is really not good.
We should be able to define it the same way as the global permissions in Power BI Desktop.
The Data Source concept is inheritate from Report Server that is not capable of dealing with dynamic queries.
An improvement from Microsoft is really needed, this issue is currently a Killer factor for the ramp up of Power BI Report Server in my company.
01-20-2019 04:13 PM