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
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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
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 Kudoed Authors