I have a table with a lookup to AADUser virtual table. Users using one of the applications, should only view records that have been assigned to their AADUser. This is not the same as the record owner in dataverse, so I cannot make use of the normal dataverse security protocols.
I've tried populating a collection in the app startup, which is ideal, but even testing it directly in the "text" property of a label, it doesn't work either.
My filter I'm using looks like this:
ClearCollect(EmpRoles, Filter('Employee Roles','Employee'.'User Principal Name' = Office365Users.MyProfileV2().userPrincipalName));
I checked the "User Principle Name" for my user in AADUser table directly and it's correct there, but this filter doesn't work.
I'm using Office365 connector for now, but also tried the basic User().Email property as well.
I found this to work...
ClearCollect(EmpRoles,
AddColumns('Employee Roles',
"UserPrinciple",
LookUp('AAD Users', 'AAD user id' = 'Employee Roles'[@'Employee'].'AAD user id','User Principal Name'),
"RoleName",
LookUp('Roles', Roles = 'Employee Roles'[@'Role'].Roles,Name)));
ClearCollect(EmpRoles, Filter(EmpRoles, UserPrinciple = User().Email));
It did not work when using the 'A unique identifier for AAD User' column, but when using the 'AAD User id' column, it worked, which is silly, because it's the same objects being compared with each other in any case. I suspect this might be because of Canvas app Filter and Lookup functions not returning all of the columns of the child lookup tables, if I have to guess.
WarrenBelz
89
Most Valuable Professional
Michael E. Gernaey
72
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1