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

Notifications

Announcements

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

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:
I have the same question (0)
  • 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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard