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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RethinkBI
Frequent Visitor

Dynamic RLS with numbers instead of email addresses?

I am working on an embedded Power BI solution for our customers.

 

I want to use row level security with Account IDs (e.g., '22343') instead of email addresses (e.g., 'info@abcinc.com'). Then, a developer on my team will use this information to pass embed tokens.

 

All of the online videos and blogs seem that I've research so far only use variations of USERPRINCIPAL() and USER NAME() when setting up RLS.

 

Is it possible to set up RLS with a number value? Am I thinking about this problem right way?

 

Thanks in advance.

 

-Nick

2 REPLIES 2
amitchandak
Super User
Super User

@RethinkBI , You need to have table with email and account ID, account id can join with other tables. email id in this table can be filtered with USERPRINCIPAL

 

Only in the case of embedded power bi you can send USERPRINCIPAL of you choice.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amit....a developer colleague suggested this DAX code and it worked:

Account ID = Value(USERNAME())

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors