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 / Listing users with par...
Power Apps
Answered

Listing users with particular role

(0) ShareShare
ReportReport
Posted on by 2

Hi, I have a scenario where I want to list User with a particular security role. Let's say we have the user with Roles Account Manager, Activity Feed, CEO etc. I want the Users with Role Account Manger only in PowerApps. Can you show us how can it be achieved?

Categories:
  • Dawidvh Profile Picture
    1,346 on at

    Hi @summitb

     

    Are you trying to only give users with a specific role access to open the PowerApp, or are you trying to verify that a user has a specific role before allowing him\her to perform a certain action?

     

    The first might not be easy to do, but the second can be done by using the Office 365 Users connector and the following formula which will return true or false.

    Office365Users.MyProfileV2().jobTitle = "Top Dog"

     

  • Summit Bajracharya Profile Picture
    on at

    Hey @DavesTechTips,
    I wanted to list users that have certain roles. For example I want to show list of System Adminstrators in the Gallery List in PowerApps. Is there any way out for this?

  • Dawidvh Profile Picture
    1,346 on at

    Hi Summit,

     

    a) So you would like to get this list from the O365 tenant?

    b) How many users do you in the organisation?

     

     

  • summitb Profile Picture
    2 on at

    We have around 10-15. For a specific role, let's say System Administrator, we have around 3 people. Can we list them out?

  • Verified answer
    Dawidvh Profile Picture
    1,346 on at

    Hi @summitb

     

    This is not a great solution for larger environments, but for smaller environments you could write the Office365 users into a collection, and then filter the collection according to JobTitle.

    Write address book into collection:

    ClearCollect(colAddressBook,Office365Users.SearchUser({searchTerm:"",top:500}))

    (*If you don't specify the Top parameter, the query only returns 100 results, which depending on your environment, might not be enough for all users)

     

    Filter accordingly:

    Filter(colAddressBook,JobTitle="Chief Executive Officer")

    Let me know if you don't come right.

     

    twitter: @dawidvh

    youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

    >>If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.<<

     

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard