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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Different UPN when embedding with powerbi.load vs powerbi.embed

Hello,

 

We've started having an issue today with our embedded PowerBI reports. We tracked down the source of the issue to a new difference in behavior between powerbi.load and powerbi.embed.

 

When calling powerbi.load, the report appears to be running in the scope of the MasterUser that the embed token was generated with (calling USERPRINCIPALNAME() gives MasterUser). However, when we call powerbi.embed, the report is ran in the scope of the user the token was generated for.

 

We can't switch our embed code over to using powerbi.embed, as it prevents the usage of callback functions/events (loaded, clicked, etc).

 

It seems that this issue started today sometime. Is anybody else having this issue?

 

Thanks,

~Andrew

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

Did you mean the embed content uses the user that generates embed token to authorization instead of 'master users' credentials?

If that is the case, have you saving multiple user credentials on your devices? If that is the case, I'd like to suggest your test with private mode or remove these cached data before the test.

BTW, you can also try to use service principal mode to do embed operation, it should be better than master user mode.

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Docs
Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

Did you mean the embed content uses the user that generates embed token to authorization instead of 'master users' credentials?

If that is the case, have you saving multiple user credentials on your devices? If that is the case, I'd like to suggest your test with private mode or remove these cached data before the test.

BTW, you can also try to use service principal mode to do embed operation, it should be better than master user mode.

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Docs
Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thank you so much! Authenticating with a service principal did resolve the issue when using .load(). I'll accept this as the solution.

 

Is service principal mode the preferred/recommended to authenticate for embedding operations?

 

Regards,

~Andrew

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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