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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors