Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Can I use username() for row level security instead of userprincipalname(). I have ad user name in the table but not user email. Could you please let me know if this will work. Also my table is in direct query mode so I won't be able to modify the data.
Solved! Go to Solution.
yes this approach also works
just to be sure that the name your have in the table is in the right format
Create a measure _Test = Username()
Then add this measure in a card, to see how it is formatted vs what you have in the table (maybe you will have to add the domain in the list)
Hi @DiKi-I
We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @DiKi-I
I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
Looking forward to your response!
Best Regards,
Cheri Srikanth
Hi @DiKi-I
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @DiKi-I
In addition to @Idrissshatila @Cookistador below additional suggestions for implementing Row-Level Security (RLS) in Power BI.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hello @DiKi-I ,
make sure to test it in the view role before applying it, since this is a sensitive case.
Proud to be a Super User! | |
my username is getting resolved to upn in service. I will test with the actual data once I have gateway setup.
yes this approach also works
just to be sure that the name your have in the table is in the right format
Create a measure _Test = Username()
Then add this measure in a card, to see how it is formatted vs what you have in the table (maybe you will have to add the domain in the list)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 46 | |
| 42 | |
| 34 | |
| 31 | |
| 21 |
| User | Count |
|---|---|
| 140 | |
| 125 | |
| 100 | |
| 82 | |
| 64 |