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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Power BI embedded Rest api authentication (Javascript)

Hi,

 

I'm using the package "powerbi-client-react" to embed a PowerBI report on a react application. 

 

<PowerBIEmbed
	embedConfig = {{
		type: 'report',   // Supported types: report, dashboard, tile, visual and qna
		id: '<Report Id>', 
		embedUrl: '<Embed Url>',
		accessToken: '<Access Token>',    // Keep as empty string, null or undefined
		tokenType: models.TokenType.Embed
	}}
/>

 

The package itself works well, but I'm having trouble getting an access token (for the organization) that works. I've configured the API permissions on our app resgistration to connect to PowerBI.

 

rubenberna_0-1639580026579.png

 

However, when using this token to render the powerBI embeded, I get this network error, which suggests an invalid token:

 

rubenberna_1-1639580140959.png

 

If I get a token directly from the PowerBI developer console -- copy(powerBIAccessToken) --, this token works well. But the token that we get from the MFA OAuth doesn't work.

 

Thank you for your help!

 

 

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

MFA configuration is not controlled by PowerBI, you can disable MFA requirement for your master user following the steps described in https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates


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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.