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 / add security to a gallery
Power Apps
Unanswered

add security to a gallery

(0) ShareShare
ReportReport
Posted on by 7

I am currently, making navigation bar, but i only want the admin navigation to show when there is an administrator logged in. I've tried some options and don't think it has worked as often it makes the whole gallery disappear.

Categories:
I have the same question (0)
  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @talzo777 

     

    I have created a horizontal gallery to show different pages

    AARON_C_0-1707442048199.png

     

    In the Visible property of the Label, I have the formula as shown in the image below:

    AARON_C_1-1707442072178.png

     

    adminUser is a formula I created in the Formulas property of the app. <--  adminUser = "admin@email.com";  -->

     

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at

    Hi @talzo777 

     

    If you want to add security to anything you need to set up roles or you need to query all of the roles and or security groups the current user who is logged in is associated to.

     

    But to simplify watch this video

    Implementing Role Based Security in Power Apps (youtube.com)

    Reza is great.

     


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • talzo777 Profile Picture
    7 on at

    This is what i tried to do initaially .. but his navigation system is set in the onstart area i think and i dont know how to do that! but his videos have been great otherwise

     

  • Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at

    Hi @talzo777 

     

    Do you mean you dont know how to put the code at all, or simply how to get to the OnStart (or Enable it). You can also use the OnVisible of the Form too versus OnStart

     

    Overall the process isn't hard, it really is pretty much what I said and I do

     

    I create a Collection of Roles and a Collection of Security Groups in the OnStart or OnVisible of the primary form(OnStart is part of the App on the top left, not the Form)

     

    Roles can be anything you want, like I use SharePoint a lot so I dont have to have license fees from Dataverse, or I have roles in AAD. Once they are loaded then in any control you simply add things like @AARON_C  said.

     

    In my case with a collection I would do something like

     

    Visible Property

    "Admin" in Roles

    Where Roles is the Collection and that returns true or false

     

    The trick is getting the roles/groups. 

     

    What ones would you be using?


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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