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 / PowerApp button - spec...
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:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @sid-agarwal - nothing obviously wrong with that code. I would note however that the LookUp function is case sensitive. Are you certain that the values entered in the email address column are in the correct case?

  • curiousperson01 Profile Picture
    114 on at

    @Amik they are all in lowercase as the ones that were already in the list before I added the new ones. 

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @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.

  • curiousperson01 Profile Picture
    114 on at

    @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
    )
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @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. 

  • Akshansh-Sharma Profile Picture
    298 Moderator on at

    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/

  • curiousperson01 Profile Picture
    114 on at

    @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.

  • curiousperson01 Profile Picture
    114 on at

    @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. 

  • Sam_Fawzi Profile Picture
    902 Super User 2026 Season 1 on at

    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,

  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @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.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard