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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Timsonater
Frequent Visitor

Is there any way to use a report viewers role, email or username as a query parameter?

Hi,

 

I am working on a report that will used to visualize a large amount of data for over 100 distinct customers via DirectQuery/SQL. There is far too much data to use typical RLS to enforce filtering so each customer see's only their own data.

 

Is there any way I can use the report viewer's role, email or username as a query parameter? Or any other indirect way I could relate that information to my queries?

 

I am aware of the DAX expressions USERPRINCIPALNAME() and USERNAME() but they can only be used after the DirectQuery Queries are complete.

 

Thanks,

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Timsonater ,

I'm afraid that there is no other suitable method to achieve your requirement except the dynamic RLS...

Row-level security (RLS) with Power BI

Power Bi: Row Level Security using User Principal Name ()

 

Or you can raise a similar idea with the following one and add your comments there to make this feature coming sooner.

Assign USERNAME () to parameter of a SQL function data source

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.