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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
sramsey
New Member

Implementing RLS for embedded analytics with an injected client ID

Hi,

 

We're trying to embed power BI into our core web app using azure, and had a previous incarnation in place using the old workspace collections (for demo purposes). We've now come back to this project with intentions to get it into production after developing a range of dashboards to find that way of embedding has been deprecated.

 

We've managed to get our reports exposed through the app using the azure Power BI Embedded resource, but we're now having issues with RLS.

 

Previously we had set a role to be [Client ID] = USERNAME(), and then set the username to be the ID of the client whose context the user is in. Now we're unable to do this because username is actually used in order to authenticate (so cannot be replaced by the client ID).

 

Is there any way to refine the dataset (securely) to a specific identity?

 

Thanks

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee


@sramsey wrote:

Hi,

 

We're trying to embed power BI into our core web app using azure, and had a previous incarnation in place using the old workspace collections (for demo purposes). We've now come back to this project with intentions to get it into production after developing a range of dashboards to find that way of embedding has been deprecated.

 

We've managed to get our reports exposed through the app using the azure Power BI Embedded resource, but we're now having issues with RLS.

 

Previously we had set a role to be [Client ID] = USERNAME(), and then set the username to be the ID of the client whose context the user is in. Now we're unable to do this because username is actually used in order to authenticate (so cannot be replaced by the client ID).

 

Is there any way to refine the dataset (securely) to a specific identity?

 

Thanks


@sramsey

I don't know where you get the idea the username is for authentication, in the case Embedding for your customers, you still assign username and role when generating the embedded token. See Use row-level security with Power BI embedded content.

The correlated REST API is GenerateToken.

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@sramsey wrote:

Hi,

 

We're trying to embed power BI into our core web app using azure, and had a previous incarnation in place using the old workspace collections (for demo purposes). We've now come back to this project with intentions to get it into production after developing a range of dashboards to find that way of embedding has been deprecated.

 

We've managed to get our reports exposed through the app using the azure Power BI Embedded resource, but we're now having issues with RLS.

 

Previously we had set a role to be [Client ID] = USERNAME(), and then set the username to be the ID of the client whose context the user is in. Now we're unable to do this because username is actually used in order to authenticate (so cannot be replaced by the client ID).

 

Is there any way to refine the dataset (securely) to a specific identity?

 

Thanks


@sramsey

I don't know where you get the idea the username is for authentication, in the case Embedding for your customers, you still assign username and role when generating the embedded token. See Use row-level security with Power BI embedded content.

The correlated REST API is GenerateToken.

Misunderstanding on our side, thanks for the help!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.