Forum Discussion
Creating embed token with effective identity is not supported for this datasource
I want to add row level security (RLS) to power BI embed (app owns data). Using the sample application (https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/App%20Owns%20Data)
I get the following error: Creating embed token with effective identity is not supported for this datasource
I'm trying to connect to a power BI report with an sql azure dataset.
This is the code that sends the rls request.
// This is how you create embed token with effective identities
if (!string.IsNullOrWhiteSpace(username))
{
var rls = new EffectiveIdentity(username, new List<string> { report.DatasetId });
if (!string.IsNullOrWhiteSpace(roles))
{
var rolesList = new List<string>();
rolesList.AddRange(roles.Split(','));
rls.Roles = rolesList;
}
// Generate Embed Token with effective identities.
generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view", identities: new List<EffectiveIdentity> { rls });
}I don't see anything that has that error. Thanks in advance. I tried azure sql datasource, regular sql datasource, and live vs embed datasets.
5 Replies
- v-juanli-msft
Community Support
Hi Anonymous
Is the connection "import","direct query" or "live connection"?
Please learn token-based identity with Azure SQL Database from this article.
Also check considerations and limitations of Row-level security with Power BI Embedded here.
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Hi Maggie,
Thanks for the reply.
We are using the app owns data scenario. That is, one service user in the web.config in the application. I believe your first link is a way to use row level security in azure sql via active directory. This is not our situation.
In the 2nd link, can you clarify what this means.
- This capability restricts use with Power BI Premium only.
Does this mean this is a premium only feature?
I tried both import and direct query, both got the same error.
- AnonymousNot applicable
Do I need to open a ticket for this in order to get more action?