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
Anonymous
Not applicable

Report Builder - using id that is not User!UserID for row level security

I am trying to learn about adding row level security to a reoprt, and I have been able to do it like in the docs. The issue that arose is that I was told that the User!UserId that is being used will not be used in the future. So I was trying to find a way to be able to do row level security by trying to get a different id.

 

1. Is this possible? or is User!UserId the only option?

2. Does that mean I need to figure out a way to change the current User!UserId name to some other id. 

 

Thanks for any help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Anonymous Thank you for your reply.

I'm sorry that I didn't provide you with suitable suggestions before.
As you said, at present, Power BI paging reports need to use the parameter UserID when setting up RLS, and at present there is no other built-in field that can directly replace the UserID, because at present, UserID is a fixed parameter for determining the RLS in paging reports.
So if you have users who can no longer use their previous UserID, you will need to re-add their new UserID to the RLS determination parameter.

I hope the following documentation will help you with this
URL:
Use row-level security when embedding paginated reports - Power BI | Microsoft Learn

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
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

3 REPLIES 3
Anonymous
Not applicable

Hi,@Anonymous 
I am glad to help you.
According to your description, you have an issue with setting up dynamic RLS (displaying data access based on the account of the currently accessing user) in that there are instances where the RLS audience is no longer using the current Power BI ID, and you are questioning whether or not there is a restriction by user ID only!
Let me give you some suggestions that you can consider.
1. Whether User ID is the only way to set up RLS.
Regarding dynamic RLS, by comparing the user ID that exists in the dataset with the user ID of the user who is currently accessing the report (the account logged in by the Power BI service), you can limit the data that the user can access.
Currently this approach is commonly used: when a user accesses a report, they need to be logged in to a Power BI Service account, so it is very convenient and common to use a commonly used token as the basis for RLS execution.
2. If the RLS audience is no longer using the previous account, then when they access the report with the new account, you need to re-add the new account name to the RLS rules.
Of course, if you don't want to use the Power BI ID of the User login as the basis for the RLS restriction, you can use other custom identifiers instead, but this may not allow for dynamic RLS restriction because the fields are set to fixed values, and the most salient difference for each user accessing the report is the User ID of the current user who is logged into the Power BI Service. ID
Therefore, I recommend that you follow the documented tutorial to implement RLS, which is very convenient and efficient!

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

Anonymous
Not applicable

Hi v-jtian-msft,

 

Thanks for the information. I was more asking if besides User!UserID in Report Builder is there another built-in option similar to userprincipalname() in Power BI desktop? I did not see one in the docs but wanted to see if anyone else knows a way.

 

Right now we have both Power BI Desktop and Report Builder reports. The id's that are being pulled are different and the id that PBI is using is the one that we will be migrating to. So I was wondering if there was a way in Report Builder to pull the same id that is being used in PBI. 

 

Thanks for your help!

Anonymous
Not applicable

Hi,@Anonymous Thank you for your reply.

I'm sorry that I didn't provide you with suitable suggestions before.
As you said, at present, Power BI paging reports need to use the parameter UserID when setting up RLS, and at present there is no other built-in field that can directly replace the UserID, because at present, UserID is a fixed parameter for determining the RLS in paging reports.
So if you have users who can no longer use their previous UserID, you will need to re-add their new UserID to the RLS determination parameter.

I hope the following documentation will help you with this
URL:
Use row-level security when embedding paginated reports - Power BI | Microsoft Learn

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.