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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
D_PBI
Post Partisan
Post Partisan

Can an embedded PBI report only accept USERNAME() or USERPRINCIPALNAME() as its parameter for RLS?

Hi,
I have a PBI report that is embedded into a portal. The portal team would like to pass through the contactid (a GUID) to the PBI report for the report's Row Level Security (RLS) to consume so to restrict the viewing data.
I have built a PBI report that has Power Query (PQ) to accept this contactid and do the necessaryto restrict the data. However, when I confirgured the report's RLS roles and attempt a 'View as' and pass a contactid the report doesn't filter (doesn't restrict the data) but when I apply an email address (so the USERPRINCIPALNAME() ) as the 'View as' parameter the report does restrict the data. The table in the data-model is built to accept either a contactid or email to filter the report.
This tells me that a PBI report's RLS, the actual RLS mechanism itself, cannot accept a contactid as a parameter, passed from the portal, but instead can only accept a USERPRINCIPALNAME() as a valid RLS parameter.

Am I correct in my findings or can a contactid (GUID) be accepted as a RLS parameter for an embedded PBI report?
I would like to be sure before I respond back to the portal team informing them that only a USERPRINCIPALNAME() (or even the USERNAME() ) can be used.
Thanks.

1 REPLY 1
amitchandak
Super User
Super User

@D_PBI , if you are using embedded power bi? if yes,  then you can generate a key to connect then you can have your own RLS using id, email etc

 

Refer if these can help

https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security

https://www.youtube.com/watch?v=yNF-_l2f7w0

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

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.