Forum Discussion
URL, Scope and Grant_type to use when creating a PBI REST API access_token?
anyone, please help me with this, I've been stuck with the same error (403 forbidden). I have an app registered within Azure and even I can get the access token, but when I use the token to retrieve the datasets from API, it shows the above 403 error.
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.
- Dayspring3 years agoRegular Visitor
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