Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ashvini-dure
Frequent Visitor

Power BI Playground - report embed

Hi,

 

Can you help me about generation of AAD token for report embediing in EDIT mode.

 

Regards,

 

Ashvini Dure

3 ACCEPTED SOLUTIONS
Akash_Varuna
Super User
Super User

Hi @ashvini-dure you could generate an AAD token by registering an Azure AD app with Report.ReadWrite.All permissions. Authenticate via OAuth 2.0 to get an access token from Azure AD. Use this token as a bearer token in your embed configuration to enable edit mode

View solution in original post

v-karpurapud
Community Support
Community Support

Hi @ashvini-dure 


Welcome to the Microsoft Fabric Forum. Also, thank you @Akash_Varuna for your quick response.

To embed a Power BI report in Edit mode using Power BI Playground or a custom app, you need to generate an Azure Active Directory (AAD) token using a registered Azure AD application that has the Power BI API permissions (Dataset.ReadWrite.All) granted with admin consent.

The app must use a delegated flow, meaning the AAD token must represent a real Power BI user who has edit permissions on the report. After registering the app in Azure AD, create a client secret, and use the OAuth 2.0 authorization code flow to obtain an AAD access token with the required scopes.

This token is then used to call the Power BI REST API's /GenerateToken endpoint with "accessLevel": "Edit" in the body to obtain an embed token. This embed token enables the report to be embedded in edit mode within a web app or Power BI Playground. Ensure that the workspace where the report resides is backed by a Power BI Pro or Fabric capacity (F64 or higher).

For reference : What is the Power BI embedded analytics playground - Power BI | Microsoft Learn
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Embed content in your Power BI embedded analytics application - Power BI | Microsoft Learn

If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.

Thank You!
 

View solution in original post

Hi @ashvini-dure 


The 403 error on the clusterdetails endpoint typically means the AAD token lacks the necessary delegated permissions or doesn't represent a valid Power BI user. This endpoint is used internally by Power BI during embedding to locate the correct service cluster.
 

To fix this, ensure you are using an AAD token obtained via the OAuth 2.0 authorization code flow, representing a real Power BI Pro user with edit access to the report. The Azure AD app must have the Dataset.ReadWrite.All delegated permission with admin consent granted, and the token scope should be set to https://analysis.windows.net/powerbi/api/.default.
 
Avoid calling the clusterdetails endpoint directly; instead, use the standard /GenerateToken API for embedding. If issues persist, inspect the token via jwt.ms to verify user identity and scopes.

If this post helps, kindly mark it as Accepted Solution.

Thank You!

View solution in original post

6 REPLIES 6
ashvini-dure
Frequent Visitor

Hi @v-karpurapud , we successfully made chnages as you said still we are getting 403 error for clusterdetails API. I have decoded token in jwt.ms as well. 

ashvinidure_0-1748405642923.png

Kindly guide me

 

v-karpurapud
Community Support
Community Support

Hi @ashvini-dure 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @ashvini-dure 


Welcome to the Microsoft Fabric Forum. Also, thank you @Akash_Varuna for your quick response.

To embed a Power BI report in Edit mode using Power BI Playground or a custom app, you need to generate an Azure Active Directory (AAD) token using a registered Azure AD application that has the Power BI API permissions (Dataset.ReadWrite.All) granted with admin consent.

The app must use a delegated flow, meaning the AAD token must represent a real Power BI user who has edit permissions on the report. After registering the app in Azure AD, create a client secret, and use the OAuth 2.0 authorization code flow to obtain an AAD access token with the required scopes.

This token is then used to call the Power BI REST API's /GenerateToken endpoint with "accessLevel": "Edit" in the body to obtain an embed token. This embed token enables the report to be embedded in edit mode within a web app or Power BI Playground. Ensure that the workspace where the report resides is backed by a Power BI Pro or Fabric capacity (F64 or higher).

For reference : What is the Power BI embedded analytics playground - Power BI | Microsoft Learn
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Embed content in your Power BI embedded analytics application - Power BI | Microsoft Learn

If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.

Thank You!
 

Thank you so much.

 

I did everything and now passing Aad token still getting one error "https://api.powerbi.com/powerbi/globalservice/v201606/clusterdetails" this api with 403 error

Hi @ashvini-dure 


The 403 error on the clusterdetails endpoint typically means the AAD token lacks the necessary delegated permissions or doesn't represent a valid Power BI user. This endpoint is used internally by Power BI during embedding to locate the correct service cluster.
 

To fix this, ensure you are using an AAD token obtained via the OAuth 2.0 authorization code flow, representing a real Power BI Pro user with edit access to the report. The Azure AD app must have the Dataset.ReadWrite.All delegated permission with admin consent granted, and the token scope should be set to https://analysis.windows.net/powerbi/api/.default.
 
Avoid calling the clusterdetails endpoint directly; instead, use the standard /GenerateToken API for embedding. If issues persist, inspect the token via jwt.ms to verify user identity and scopes.

If this post helps, kindly mark it as Accepted Solution.

Thank You!

Akash_Varuna
Super User
Super User

Hi @ashvini-dure you could generate an AAD token by registering an Azure AD app with Report.ReadWrite.All permissions. Authenticate via OAuth 2.0 to get an access token from Azure AD. Use this token as a bearer token in your embed configuration to enable edit mode

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.