Forum Discussion
URL, Scope and Grant_type to use when creating a PBI REST API access_token?
Hi Dayspring
Does your service principal have access to the workspace (through a security group or directly)?
Did you try to see the response body, sometimes it has additional info for the reason you get the error.
How to provide access to the workspace and also please provide the list of scopes that I should use while authenticating, as of now, I'm using the below scopes.
openid
offline_access
- AmosHersch3 years agoMicrosoft Employee
Dayspring each API has the list of required scopes, so it depends on which API you are using. You should follow the docs, for example: Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
For permissions you can either provide permissiong through Power BI portal as described here Roles in workspaces in Power BI - Power BI | Microsoft Learn or use an API to provide permissions Groups - Add Group User - REST API (Power BI Power BI REST APIs) | Microsoft Learn