Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am encountering an issue accessing the endpoints for reports and datasets in the Power BI API. My original goal is to generate the embed token using application permissions. However, upon investigating the access, I noticed that only the groups endpoint is accessible, while the reports and datasets endpoints do not appear.
I used JWT to decode the token I’m passing and saw that only the permissions roles: ["Tenant.ReadWrite.All", "Tenant.Read.All"] are being included in the token. According to the documentation, I need permissions for reports and datasets, but I added these permissions under ‘delegated permissions’ because they do not exist under ‘application permissions’. It seems the token only includes application permissions.
I have created the service in Azure and granted all the necessary permissions:
Solved! Go to Solution.
Hi @Datawake .
Your issue is due to application permissions not including Report.Read.All and Dataset.Read.All, as these exist only under delegated permissions. Since you're using App-Only authentication, follow these steps:
Enable Service Principal Access in Power BI
Grant Workspace-Level Access: Add your Service Principal (App ID) as an Admin or Member in the Power BI Workspace
Use Client Credentials Flow for Authentication: Ensure your OAuth token request uses client_credentials and resource=https://analysis.windows.net/powerbi/api
Correct API Permissions in Azure AD
Generate Embed Token Using API
POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/GenerateToken
Authorization: Bearer {access_token}
Content-Type: application/json
{
"accessLevel": "View",
"identities": []
}
"The goal is to turn data into information, and information into insight." – Carly Fiorina
🔗 Need Power BI help? Connect on LinkedIn: Rohit Kumar’s LinkedIn
Hi @Datawake .
Your issue is due to application permissions not including Report.Read.All and Dataset.Read.All, as these exist only under delegated permissions. Since you're using App-Only authentication, follow these steps:
Enable Service Principal Access in Power BI
Grant Workspace-Level Access: Add your Service Principal (App ID) as an Admin or Member in the Power BI Workspace
Use Client Credentials Flow for Authentication: Ensure your OAuth token request uses client_credentials and resource=https://analysis.windows.net/powerbi/api
Correct API Permissions in Azure AD
Generate Embed Token Using API
POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/GenerateToken
Authorization: Bearer {access_token}
Content-Type: application/json
{
"accessLevel": "View",
"identities": []
}
"The goal is to turn data into information, and information into insight." – Carly Fiorina
🔗 Need Power BI help? Connect on LinkedIn: Rohit Kumar’s LinkedIn
Hi @rohit1991 ,
Thank you so much for your detailed instructions! I followed your steps, and it worked perfectly. I really appreciate your help.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
39 | |
26 | |
23 | |
19 | |
17 |
User | Count |
---|---|
50 | |
40 | |
24 | |
21 | |
20 |