March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I am rather a newbie in Fabric/Power BI Service. Here is the problem:
I need to hide or display a column in a pag report depending on the UserID. Easy if we are talking about a single user: I compare the value of UserID to the hardcoded value in AD like
if UserID = "DOMAIN\firstlast" then display the column else hide
When I publish this it doesn't work because the Service apparently uses Entra "firstlast@mycompany" format while the company network u uses AD' "DOMAIN\firstlast". It's ok, in the Power BI Report Builder I hardcoded comparison value as "firstlast@mycompany" and then it works when I publish the report.
Here is the problem: I need to use a security group for some people entitled to see the column in the report, but not for all entitled to view the report. My Entra admin created SG_PBI_ColumnMaskingTest which has currently one member (me), I gave SG_PBI_ColumnMaskingTest permission to the workspace where the pag report lives. In this workspace there will be also other groups who can see the report but they are not entitled to see the one column. So now I need to capture, when the report is open in the service, the name of the group that member of is accessing the report and see if it's equal to SG_PBI_ColumnMaskingTest or grab the userid and check if it is member of the group.
Any words of wisdom? Thanks
That's great, Gilbert, thank you very much, I'll add it to my tool chest, but what about a security group, I'd like to avoid listing all users who should be able to view the column. I'll keep digging
Cheers
Hi @est0815
The good news is that you can use the Entra ID security group to manage your users, even though the underlying model will be using the userprincipalname. It is coded so that it can find the users that are part of the security group.
Hi @est0815
You can use the DAX function called UserPrincipalName to get the users email address. You can then use this within a DAX measure to show or hard something if the user is equal to the user principal name.
hat's great, Gilbert, thank you very much, I'll add it to my tool chest, but what about a security group, I'd like to avoid listing all users who should be able to view the column. I'll keep digging
Cheers
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
36 | |
27 | |
19 | |
11 | |
8 |
User | Count |
---|---|
54 | |
43 | |
24 | |
13 | |
12 |