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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
abdullah12
New Member

How to do Private Embedding of Power BI dashboard in ReactJs Web App.? What will be the Post request

 useEffect(() => {
    const msalConfig = {
      auth: {
        clientId: {clientid},
        redirectUri: window.location.origin + '/',
      }
    };

    const msalInstance = new PublicClientApplication(msalConfig);

    const loginRequest = {
    };

    msalInstance.loginPopup(loginRequest).then((response) => {
      setAccessToken(response.accessToken);
    }).catch((error) => {
      console.error('Login error:', error);
    });
  }, [clientId, tenantId]);
 
what is the error in my post request ? I am not getting Access token 
1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @abdullah12 

please try the following post

https://login.microsoftonline.com/${tenant-id}/oauth2/token

And you can refer to the following link, it is about how to embed power bi to react.

How to Embed A Power BI Report in React | by Diksha Chhablani | Globant | Medium

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors