web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with Lookup deleg...
Power Apps
Answered

Help with Lookup delegation warning in Dataverse

(0) ShareShare
ReportReport
Posted on by 15,679 Super User 2024 Season 1

Hi everyone,

 

I have added the Security Role entity and the User entity as data sources in a canvas app. I can leverage the relationship between both tables to return the security roles assigned to the user currently logged into the canvas app.

 

However, I also want to check if if the user has been assigned a specific role/s.

 

Unfortunately, using a Lookup results in a delegation warning. I think I can use a Collection instead and ignore the delegation warning, but I wanted to check if anyone has a better approach.

 

 

 Set(
 varPermission,
 CountRows(
 Filter(
 LookUp(
 Users,
 'Primary Email' = User().Email
 ).'Security Roles (systemuserroles_association)',
 Name = "HR_Apps_Administrator" || Name = "System Administrator"
 )
 ) > 0
 )

 

 

Amik_0-1675298939631.png

 

Best regards,

Imran-Ami

 

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Decided to use a hidden Gallery as a workaround.

     

    I applied the following to the Items property of the Gallery:

     

    LookUp(Users,'Primary Email'= User().Email).'Security Roles (systemuserroles_association)'

     

    Then modified the variable to look at the Gallery instead

     

    Set(
     varHasPermission,
     CountRows(
     Filter(
     Gallery_SecurityRoles_Hidden.AllItems,
     Security_role.Text = "HR_Apps_Administrator" || Security_role.Text = "System Administrator"
     )
     ) > 0
    );

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard