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 / Restrict access to use...
Power Apps
Unanswered

Restrict access to users within a certain team

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

I have a screen that I would like to restrict access to only a certain team either by disabling or hiding the button the navigates to it.  If it helps, this team does share the same manager (either directly or indirectly) in case something like 'AllReports' similar to Outlook can be used.  What's the best way to do this?

 

Thanks in advance!

Categories:
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Many ways to do it.

    you can create sharepoint list with emails of team members. Then in App.OnStart set variable 

    Set(IsMember,!IsBlank(LookUp(LIstName, User().Email = EmailFromList)));

    The above variable will be Boolean. 

    Then on the button set this in the display mode property:

    If(IsMember,Disabled,Edit);

    Button will be disabled if he is in the team and enabled if he is not in the team.

     

    Another methods will be same you just need a specific list against you can check and set your variable.

    You can use office365group connector if they are in specific group.

    If they all have 1 manager. And no other member in the organization have that person as manager. Then you can use office 365 user connection to check logged in user's manager. and update the variable accordingly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ahh I was afraid I'd have to create another list for members.

     

    For the second method, does this only work if the user is a direct report of the referenced manager? In some cases, the user can be 2 or even 3 degrees below the manager.

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    If you'll write some kind of complicated logic that checks the layers of managers. It can work. But you should consider about manageability of the app. Creating new list or checking against existing SharePoint group or office 365 group will be much more simpler to implement and manage.

    you can also add department name in the azure active directory for those users and fetch the value from there. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks ZMan I'll give these a look

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard