Forum Discussion
pawels
6 years agoNew Member
Bearer generated on docs.microsoft.com works while oauth2 doesn't
Good day all, I'm struggling for a while with generating Bearer for PBI REST API. Action that I'd like to make is to trigger truncating streaming data: https://docs.microsoft.com/en-us/rest/api/...
jppp
6 years agoContinued Contributor
Hi pawels ,
One thing that pops my mind: does your application (=clientID) has access to the workgroup/dataset?
The 'try it' option is using your account to impersonate you to connect to the REST API and the code sample you share is using a ClinetID/Secret scheme to authenticate.
-JP
- pawels6 years agoNew Member
Hey jppp !
Thank you for reply. Could you please evaluate how to check that access or eventually how to add this access to?Cheers!
PS- jppp6 years agoContinued Contributor
Hi pawels
The SP should have been added to the 'users' that have access to the workspace, see step 5 of https://docs.microsoft.com/en-us/power-bi/developer/embed-service-principal#get-started-with-a-service-principal
-JP