Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

PowerApp button - specific users allowed and greyed for others

(1) ShareShare
ReportReport
Posted on by 114

Hi,
I took over an app from my colleague and she developed a feature in there that allowed access to two buttons only to specific people. Those specific people, as per the code, looks like are either from share point list or the current user submitting the request. I added 2 more people to the share point list to give them admin access but still doesn't work. These people still can't see the button come alive even after re-publishing, refreshing the app.
The 3 screenshots are below:

sidagarwal_0-1719934976646.png

 

sidagarwal_1-1719935009957.png

sidagarwal_2-1719935167231.png

 

Categories:
  • curiousperson01 Profile Picture
    114 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @samfawzi_acml there is no default mode on these buttons. 

    sidagarwal_0-1720485890043.png

     

  • curiousperson01 Profile Picture
    114 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @Amik you are genius. I think that is the issue. I added their email addresses as their firstname.lastname where as the system is using their username. This fixed my issue. Thank you for working with me on this one.

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @sid-agarwal - that's not what I was suggesting. To repeat, I would check if email address being displayed to them in the app is exactly how it appears in your List.

  • Sam_Fawzi Profile Picture
    501 Super User 2025 Season 1 on at
    Re: PowerApp button - specific users allowed and greyed for others

    Hi Sid,

    Thank you for sharing the details. Could you please send us the code for the default mode of these buttons? This will help us understand the current configuration and why the new users are not able to access the buttons even after being added to the SharePoint list.

    Cheers,

  • curiousperson01 Profile Picture
    114 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @Akshansh-Sharma not sure if I can. I do not want to tamper a lot in this app as it is used widely by people currently. 

  • curiousperson01 Profile Picture
    114 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @Amik anybody who opens that app, it shows their email. Does that help?
    shows me my email, shows my colleague their email ID - admins or users alike.

  • Akshansh-Sharma Profile Picture
    281 Super User 2025 Season 1 on at
    Re: PowerApp button - specific users allowed and greyed for others

    hi @sid-agarwal ,

     

    sometimes email address are not the best way to lookup something specially with sharepoint being the database can you please tell me if there is a chance of adding another column in your 'Admin List_1' which will store the office id/Entra ID of the user?

     

    if yes, then we can use that column to lookup a person from the list by comparing it against User().EntraId which will always give us a single unique value irrespective of the case

     

    --------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

     

    LinkedIn- https://www.linkedin.com/in/akshansharma/

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @sid-agarwal - as mentioned earlier, the Lower function is not delegable. However, so long as you can expect your list to remain under 500 rows (or max 2000 if increased via settings), then you can ignore the warning.

     

    Could you:

     

    1. Add a Label control somewhere on your screen and on the Text property, enter:

     

    User().Email

     

    2. Ask your user to open the app and share their screen. 

    3. Note that if email address being displayed to them in that Label is exactly how it appears in your list. 

  • curiousperson01 Profile Picture
    114 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @Amik Thank you so much.
    I added your recommendation. It is still the same, can't get it working.
    Also, I am getting a warning now 

    sidagarwal_0-1720017923982.png

    If(
        DataCardValue164_1.Selected.DisplayName = Office365Users.MyProfile().DisplayName || !IsBlank(
            LookUp(
                'Admin List_1',
                Lower(EmailAddress) = Lower(User().Email)
            )
        ),
        DisplayMode.Edit,
        DisplayMode.Disabled
    )
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: PowerApp button - specific users allowed and greyed for others

    @sid-agarwal - I suspect being all lower case is the cause of the problem then, as the Email attribute from a SharePoint People field is usually in Proper case.

     

    Consider using non-delegable cast function like Lower to ensure both values are being compared with the same case:

     

    If(
     DataCardValue164_1.Selected.DisplayName = Office365Users.MyProfile().DisplayName || !IsBlank(
     LookUp(
     'Admin List_1',
     Lower(EmailAddress) = Lower(User().Email)
     )
     ),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    On a separate note, while screenshots are very useful, it would also be useful if you could paste your code as text. This saves time having to type it out manually.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1