Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SeSPowerBi
Frequent Visitor

Power BI REST API Multiple Usernames In Effective Identity, RLS

Hello all,

 

I am working on a web app that uses the Power BI REST API to generate an embed token with RLS. Our application follows the 'App owns data' embed scenario. With the following effective identity I want to generate an embed token for specific reports, datasets and target workspaces.

 

There are 3 scenarios I need to handle:

1) to be able to provide project name, which will later filter the data for that project; known as the “ProjectName”

2) to be able to provide the user’s email from the AAD that was authorized, which will later filter the visible data that the user can view; known as the “User”

3) to be able to provide both the project name, as well as the user’s principal email to later filter that project for report data on the users perspective; so “ProjectName” & “User”

 

We can not tie the User to ProjectName. These are independent, and we need to handle them separately.

There is a relationship between them both, but in our scenario need report to handle them separately for filter.

 

I am able to handle both 1 & 2 separately, but I have yet to figure out how scenario 3 would be applied in the effective identity.

 

The request body looks to only be able to handle one username in the object as the unique identifier.

Is there a way to use 2 unique identifiers to filter the datasets and reports for the embedding?

 

Let ProjectName= “Green”, User= “myname@gmail.com”, where the role(s) that would use these two values to filter the dataset would be called “ProjectNameAndUser”.

 

{

  "accessLevel": "View",

  "identities": [

    {

      "username": “Green”, “myname@gmail.com

      "roles": [

        "ProjectNameAndUser",

      ],

      "datasets": [

        "abcdefghijk"

      ]

    }

  ]

}

 

Thank you for the help!

@PowerBI @rls

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @SeSPowerBi ,

You can refer the content in the following links to get it:

Applying user and role to an embed token

Power BI Embedded: Convention-based dynamic Row-level Security

Best Regards

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

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @SeSPowerBi ,

You can refer the content in the following links to get it:

Applying user and role to an embed token

Power BI Embedded: Convention-based dynamic Row-level Security

Best Regards

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

Thank you! That second link is very useful.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.