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
bbuten
Regular Visitor

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

Hi @bbuten 

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
Maggie

 

Community 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.

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.

Do I need to open a ticket for this in order to get more action?

Hi @bbuten did you ever find a resolution to this? If so, please share. We are facing a similar issue. 

Hi @bbuten 

Create a support ticket here.

 

Best Regards
Maggie

 

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 Solution Authors
Top Kudoed Authors