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 intend to call Powerbi APIs in my react app.
For this, I need to dynamically generate an access token.
And to generate that access token, I have registered my azure ad app. Have given all the powerbi permissions.
My APIs only need 'Dataset.ReadWrite.All' permission. And that permission doesn't need any admin consent.
In my react app, I'm using msal 2.0 library (msal-react and msal-browser) for authentication.
I'm hitting this endpoint in msal config which is responsible for generating an access token -
if we set any scope our azure ad app endpoint, then by default it is treated as a Microsoft graph scope. so to mention powerbi API scope, we need to define our scope w/ this hostname: https://analysis.windows.net/powerbi/api/{scope_you_want}
in my case i wanted dataset.readwrite.all so i defined my scope as https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All
this answer helped me a lot.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!