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.
Solved! Go to Solution.
Hi @Tucker,
According to the official document, the format of user name in Service is UPN, which looks like an email address admin@contoso.com. So,
1. The list of user names should be UPN, which we can find out the exact format in the Service with function userprincipalname().
2. We should use userprincipalname() in the role we defined in Desktop.
>>Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.
My test:
formula of a role: IF ( USERPRINCIPALNAME () = "test@contoso.com", [Column1] < 1000, [Column1] = 0 )
Best Regards!
Dale
Hi @Tucker,
According to the official document, the format of user name in Service is UPN, which looks like an email address admin@contoso.com. So,
1. The list of user names should be UPN, which we can find out the exact format in the Service with function userprincipalname().
2. We should use userprincipalname() in the role we defined in Desktop.
>>Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.
My test:
formula of a role: IF ( USERPRINCIPALNAME () = "test@contoso.com", [Column1] < 1000, [Column1] = 0 )
Best Regards!
Dale
Hi Dale,
Thanks for you reply, I have got this far but after playing all day yesterday but still have an issue.
So in my data I have the email address (UPN) of the user so have created a role and said [eMailAddress] = username() in the desktop. Published up to my Workspace and in Security selected "Test as Role" and I see exactly what I'd expect.
The issue then comes when I create a Content Pack and share with a O365 group (having added the user names to the RLS in the dataset), I then go into the group and "Get Data" when I then view the report in the group I can see everything.
I have read that the users need to be "Read Only" in the group which they are but I'm the Admin so don't know if that makes a difference. I got a collegue to test and he see nothing just blank reports.
Thanks again for your reply and if you know what I'm doing wrong please let me know cause I've been at this for weeks!!
Cheers Toby
Hi Toby,
I wonder if you have published an App. If so, everyone has to get a role even no filter applied to him/her. This is from my test. Have a try please.
Best Regards!
Dale
Thanks, please forgive me as I'm very new to Apps and have always used Content Packs which it looks like they are going anyway.
So I created a new App Workspace and add my team members (this has created a new O365 Group as well which is frustrating as I already have my O365 groups with shared calendars, SharePoint sites etc!)
I then Published my PBIX file up to the new Workspace instead of via My Workspace and it appears, however this still doesn't seem to have solved my issue but I may be doing something wrong
Cheers TB
All,
Thanks for your help, all seems to be fixed and is now in UAT
TB
Hi Toby,
I am not sure what was your resolution. Can you please share with us? Thanks.
Woody
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |