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 / Shoutouts Canvas App -...
Power Apps
Answered

Shoutouts Canvas App - Filter Disabled and Admin Users

(0) ShareShare
ReportReport
Posted on by 48

Hi all,

 

I'm currently working on customising the Shoutouts Canvas app, and have noticed the search bar at the top of the app is returning disabled users when searching (at our organisation we do not delete accounts, we set them to disabled and change the display name to have "TERM - " at the front of it), also is returning results for our admin accounts (these have "_a" at the end of the username).

 

I'm wondering if there is a way to filter these results out easily? 

 

Currently "items" on the search box is set to:

 

If(IsBlank(ComboBoxUserSearch.SearchText),
 Office365Users.SearchUser(),
 Office365Users.SearchUser({searchTerm: ComboBoxUserSearch.SearchText, top: 20})
)

 

Thanks for your help in advance! 

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    Please try modify the code to:

    If(IsBlank(ComboBoxUserSearch.SearchText),
     Filter(Office365Users.SearchUser(),AccountEnabled),
     Filter(Office365Users.SearchUser({searchTerm: ComboBoxUserSearch.SearchText, top: 20}),AccountEnabled)
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    Thank you so much! That worked perfect to remove disabled users!

     

    Would there be a way to also filter out users that have "- Admin" in their display name? 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    You can add a condition in Filter functions:

    EndsWith(DisplayName,"Admin")

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Edit: All good, Not(EndsWith(DisplayName,"Admin")) works perfect. Thanks for your help!

     

    Hi @v-jefferni ,

     

    That works to include users with "Admin" in their display name. Is there a way to exclude them? 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    You could add a "!" or use Not() function:

    !EndsWith(DisplayName,"Admin")
    Not(EndsWith(DisplayName,"Admin"))

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard