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
JosephBMV
New Member

Power BI Embbed app owns data with RLS

Hello everyone, I am new to the community.
I am carrying out a project with powerbi embedded, my first steps of embedding it in a web page were satisfactory. I use the documentation that microsoft has on their website and I get a good result. My scenario is the owns data app, but now it is required to use RLS in a dynamic way, since it is aimed at external clients without a power bi license. I was using the LINK  example file, I get results when I embed an application without RLS but when I use an application with RLS I get the error:

 

JosephBMV_0-1633111468503.png

I'm not very good at programming, I understand what the user and dynamic role created should pass through, but I can't identify where.

 

Regards Joseph

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @JosephBMV 

I think there may be something wrong in the step you create the embedded token. You can have a test to generate Token with RLS from this link. Please check whether you meet the required scopes. (API permission)

For reference: Generate EmbedToken for two datasets with RLS identities and a single report with read-only permissi...

Here is the offical blog about setting RLS in Embedded Report.

For reference: Applying user and role to an embed token

You can use the following Json code below as an example:

{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "Role1", "Role2" ],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.