Forum Discussion
OData issue using Power BI API
- 6 years ago
Final managed to solve this issue.
I had to delete and re-add the SPNs for the ReportServer Service account. The OData connectivity now works.
Why? Don't know but it works.
CDavies wrote:
Hi
Yes: Domain\Username
Username has db_datareader on the PBIReportServer DB and local admin rights on the server itself.
So if you are using the OData url that user does not need any driect rights on the PBIReportServer DB or the server itself.
It's not entirely clear where you are getting is error from. I'm assuming that you have successfully uploaded your report to the server and you are getting this error in the Manage > Data Sources page - is this correct?
What authentication option have you chosen - it should be "Windows Authentication".
I just double checked this on my server and using Windows Authentication and the Domain\Username format worked for me and I was able to schedule a refresh against the http://<MyServer>/PBIReports/api/v2.0/Folders endpoint.
Thanks for looking/taking an interest...
Yup, using Windowss Authentication, and getting the error from the Manage > Data Sources > Test Connection. (I'm copying and pasting the password from our password manager which works successfully with SQL queries...)
Curiously though if I copy the OData url directly into the browser address bar, it correctly gives me the .json file to download.
- d_gosbell6 years agoSuper User
Hmm, when I use an OData data source with Windows auth and domain\user the test button (and scheduled refresh) works for me. If I remove the "domain\" prefix it does not work, but I'm assuming that the server was trying to authenticate the user as a local account instead of a domain one.
CDavies wrote:
Curiously though if I copy the OData url directly into the browser address bar, it correctly gives me the .json file to download.
When you paste the URL in the browser are you logged in as the same user which you are trying to test? Or are you running the browser under your account? To test this properly you would either need to log in as the user you are trying to save against the data source or use "runas" to run the browser as this user.
If this fails it probably means this users has no rights to the folders in the PBIRS portal and you would need to go into the manage folder options and then into the Security tab and make sure this user has at least "Browser" rights.
- CDavies6 years agoResolver I
Yeah, it's a puzzle...
I get the same error using my domain/user login credentials in the test connection box, which is why it's confusing that the .json file downloads from the browser.
My user account is in an AD Group with Content Manager rights on the whole PBIReport Server.
May have to get the SQL team to SSIS these queries into a db rather than using the api... which would be a shame.
- d_gosbell6 years agoSuper User
I'm struggling to think what else we can try.
There is a long shot that this might just be a bug with the "Test" button, so maybe try saving your credentials anyway as a temporary test (since we know your account definitely gets the expected json result) and see if you can then run a scheduled refresh.
And the other thing that is worth checking are the PBIRS logs, maybe they might have more information that will give a hint as to why this is not working.
It's also worth checking how the service account for PBIRS is configured - is it using a domain account or something like NetworkService which would have permission to authenticate accounts against AD?