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

Don'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.

Reply
sudhadandu
New Member

Authentication to Power BI report in default directory to B2C tenant react Application!!!

Hi All,

 

we have the following scenario in place and got to struck!! we have all our API's DB and PBI reports are present in the default directory in our azure subsctiption. we have our UI client facing application present in the B2C tenant.

 

Now we would like to load the power BI based on the role of the user who logs in to the front end app roles like amin, manager, user etc. 

 

we have followed the microsoft documentation and did the following actions but we are not able to load the report.

1. B2C tenant : B2C Directory
 
  appname  :  contoso-ui
  clientId :  xxxxxxxx
  tenantId :  yyyyyyy 

 

2. Tenant B : default directory : 
 
  appname  :  contoso-api
  clientId :  pppppppp
  tenantId : qqqqqqqq

 

Steps:

1.  Expose an api under app registration in Tenant B:
  
   add scopes as below

   app.read 
   app.write 

2. now add the client app Id to API tenant B.

3. Add the permissions to the api in tenent B and grant it

4. Now generate the access token from the Tenant A and try to load the report.

 

We are unable to load the report can you please guide further this is really ticking our SLA and need to close this ASAP.

 

References:

https://learn.microsoft.com/en-us/azure/active-directory-b2c/client-credentials-grant-flow?pivots=b2...

https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/powerbi-client-react 

https://www.kieferconsulting.com/2021/11/01/how-to-embed-power-bi-content-in-a-react-application/ 

https://learn.microsoft.com/en-us/samples/azure-samples/ms-identity-ciam-javascript-tutorial/ms-iden...

 

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.