cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JavierOrd
Regular Visitor

Accessing dataset  requires effective identity username identical to the caller's principal name.

Hi,

 

I am having some issues adquiring token to access Power BI reports with Azure Analysis Services sources. 

 

My web app is App Owns Data with a Master User account who passes an effective identity to the reports. When the effective identity is different from Master User (most cases) it throws the next error:

 

Creating embed token for accessing dataset  requires effective identity username to be identical to the caller's principal name.

 

But the idea of Power BI embedded is allowing users outside my organization to have access to my reports, so I do not understand this error.

 

Any suggestions?

 

PS: import mode reports work.

 

Thanks

8 REPLIES 8
GunnarHo
Regular Visitor

Hi Ritesh,

yes, you have to use the Principal object ID of the Service Principal instead of the Application object ID.

Here you can find further informations: 

https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-diffe...

In our Scanario, this was the solution, now ist works.

Kind regards

 

GunnarHo
Regular Visitor

Hi @JavierOrd , @v-shex-msft 
unfortunatly we have the same issue.
We run Power BI embedded with Azure Analysis Services, until now with PBI MasterUser for authentification. As recommanded by Microsoft, we want to use a ServicePrincipal for the authentification.
We use the newest apps-own-data VS Solution and modified the Souce Code:

identities: new List<EffectiveIdentity> { new EffectiveIdentity(
username: "App ID ", // App ID from Azure
datasets: new List<string> { "Dataset ID" },
roles: new List<string>() { "RoleA" }
// customData : "XXX"
) }

But no matter which Account we use for the username (SP Application ID, Object ID), we get the following error:
Creating embed token for accessing dataset <my-data-set-guid> requries effective identity username to be identical to the caller's principal name.
The settings from the ServicePrincipal and in Power BI Service are exactly as described in the MS documentations.
Any Ideas, or Solutions?
Thank you in advance!

Hi ,

I am also receiving an error [ Accessing Dataset requires an effective identity to be provided ]

Iam trying to embed a report using service principle app owns data methods.

My report has live connection to Azure analysis services.

I have also granted the admin concent to the app still throwing error. 

If any one faced same issue please to resolve this

Hi GunnarHo,

 

Did you able to find the solution for your query using Service Principal for authentication?

I am trying to export Power BI reports (PDF) based on RLS for users, but it comes with the same error.

Thanks

Ritesh

v-shex-msft
Community Support
Community Support

Hi @JavierOrd,

Have you tried to use the 'service principal' mode to embed these contents? AFAIK, 'master user' mode seems to share the main user credentials for other user usages.

Tutorial: Embed Power BI content using a sample embed for your customers application 
Regards,

Xiaoxin Sheng

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

Hi @v-shex-msft ,

 

Service principal mode throws the same error. I have verified Service principal works correctly when opening connection to Power BI report with SSAS on premise (I just had to add Service principal id to the on prem gateway).

 

So I am in the same scenario of my first post.

HI @JavierOrd,

How did you configure the service principal?
AFAIK, you need to create a security group on the azure site to add the service principal as a group member. Then you need to add that group to power bi workspace that stores embedded content.
For gateway data source settings, you can configure it to work for workspace members.
Regards,
Xiaoxin Sheng

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

Hi @v-shex-msft,

 

I will explore service pricipal mode and let you know.

 

Thank you.

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.