This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am encountering an issue accessing the endpoints for reports and datasets in the Power BI API.
I generate the access token with:
“auth_url” : https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token
grant_type": client_credentials,
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
"scope": "https://analysis.windows.net/powerbi/api/.default"
Test in postman.
I had enabled Service Principal Access in Power BI and granted all the necessary permissions:
It seems that the datasets and reports permission should be added with API permission type, but the application permissions only show ‘Tenant.Read.All’ and ‘Tenant.ReadWrite.All’ ? Anything I miss?
Hi @Xiaolingwh ,
Thank you for reaching out to Microsoft Community.
Since the GET datasets API is working, the authentication setup appears to be correct. The 401 Unauthorized "PowerBINotAuthorizedException" during ExecuteQueries is usually related to dataset permissions or tenant settings.
Please verify the following:
Ensure both tenant settings are enabled in Power BI Admin Portal:
Service principals can use Fabric APIs
Dataset Execute Queries REST API
Explicitly grant the Service Principal:
Build permission, read permission on the dataset under Manage Permissions.
Verify the semantic model is not using unsupported scenarios such as RLS, SSO, or certain Live Connections.
Confirm the access token audience (aud) is: https://analysis.windows.net/powerbi/api
If tenant settings are restricted to a security group, ensure the Service Principal is added to that group and allow time for propagation.
Also, it is expected that Dataset/Report permissions are available only as Delegated permissions in Azure AD. Most Power BI REST APIs with Service Principals rely on workspace and tenant-level authorization rather than Application API permissions.
Hope this helps.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |