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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Using a field other than email id for RLS in PowerBi service

Hi Guys,

 

Is it possible to use a field with employee codes (example - ABC001) instead of the email ids (example - firstname.lastname@domain.com) to implementRLS on the PowerBI service.. I have a dataset that doesn't have the email ids of employees.. Only names and employee codes are available

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Unfortunately, power BI is now unable to achieve what you need . You can submit an idea for it at https://ideas.powerbi.com/forums and wait for users with the same needs as you to vote for you to help make it happen as soon as possible.

 

Best Regards,

Community Support Team _Charlotte

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

otravers
Community Champion
Community Champion

As far as I know RLS is done solely against AAD users/groups, not arbitrary codes/IDs from other sources.

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals
otravers
Community Champion
Community Champion

By "name", do you mean their AAD user name or their regular name? If the former, you should be able to use the DAX username() function instead of userprincipalname.

 

Would you be able to surface up your employees' AAD groups in your dataset? That would be a better basis to establish dynamic RLS. I have more on this topic in this entry:

https://www.oliviertravers.com/row-level-security-rls-business-intelligence/

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals
Anonymous
Not applicable

Hi.. Thanks for your reply..

 

What I meant by employee code was lets say for John Smith whose email id is john.smith@domain.com,  the employee code is ABC1234. Also, the concept of username() returning domain/username is valid only for PowerBI desktop. Ultimately, the report is going to reside on the service.

 

The data model right now only has employee names and employee code but not the email id. I wanted to know if there was any way we could pass the employee code of the employee when they log in the powerbi service for the purpose of RLS

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors