2

I'm embedding a Power BI report in a web page, using the AppOwnsData sample as a base. Everything is working fine, using the Service Principal for authentication. However, now I'd like to pass through an "Effective Identity". When I initially try this, I get the error:

InvalidRequest: Creating embed token for accessing dataset xxx shouldn't have effective identity

When I'm generating the token request parameters, if I query the dataset (like this):

var dataset = await client.Datasets.GetDatasetByIdInGroupAsync(workspaceId, datasetId);
isEffectiveIdentityRequired = dataset.IsEffectiveIdentityRequired;

I get a false - i.e. Effective Identity is not required.

I, therefore, have a two part question:

  • Is it possible to change this from the dataset configuration in PowerBI (or if not, how can this ever be true)?
  • Am I correct in assuming that dataset.IsEffectiveIdentityRequired == false would cause this error if the effective identity were passed through (the wording implies that whilst it may not be required, it may still be provided).
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
  • About the first part of your question, `IsEffectiveIdentityRequired` is not something that can be changed directly. It depends on the datasource. If it is `true` and you don't provide effective identity, you should get an error. Unfortunately I don't have an answer on the second part of your question. – Andrey Nikolov Dec 20 '19 at 13:09
  • @AndreyNikolov You say that it "depends on the datasource". In what way, exactly, does it depend? What properties of the data source would make this true? – Paul Michaels Dec 20 '19 at 13:17
  • e.g. Live connection to Analysis Services will set this, I believe. If Power BI must pass the identity of the current user to the database (so maybe the storage mode is not `Imported`), then the flag will be set. – Andrey Nikolov Dec 20 '19 at 13:22

1 Answers1

0

Make sure that you have configured dataset roles using Power BI desktop application, you can learn how to set these roles here. Using effectiveIdentity will work only after the roles are set for the dataset

May Hartov
  • 66
  • 1