Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm trying to query a specific Power BI dataset using the REST API and a Python script with a service account for authentication. However, I'm encountering an "Access Denied" error for this particular dataset.
Dataset details: The dataset uses dataflows as its data sources apart from this, there is nothing special with it. The workspace is a fabric workspace (this one is currently on trial)
Service Account: The service account I'm using has the necessary permissions and works correctly for other datasets within the same tenant and workspaces.
Azure App Permissions: I have already confirmed that the Azure app used by the service account has been granted Dataset.ReadWrite.All access.
Debugging steps so far:
My Questions
Are there any special permissions or configurations required for service accounts to access datasets with dataflows as sources?
Could this issue be related to the way access tokens are being validated for datasets with dataflows?
What steps would you recommend to debug or resolve this access issue?
Any guidance or suggestions would be greatly appreciated!
Thank you for your time and help.
@lbendlin Thanks for you reply.
In fact scp is not in the token (i am comparing with the access token generated by microsoft learn for testing the api with my personal account). Not really sure how to fix it since i am already setting the scope
Redo the app registration without delegating.
Examine the token at jwt.io - most likely the scp is missing/wrong
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |