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 / Check If User is part ...
Power Apps
Answered

Check If User is part of x groups

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

i currently have six office groups and I want to know if a user is part of a group or not.

So that the output maybe looks like this

groupId1 --> true

groupId2 --> false

groupId3 --> true

groupId4 --> true

...

 

The goal is that you can add as many groups as you want to.

 

What could be a way to solve this?

 

Categories:
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,
    You can use below formula on text property of label for testing purpose - 
    If(User().Email in Office365Groups.ListGroupMembers(<group id>).value.mail, "User is a part of the group", "User is not a part of the group")

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    You could use this graphy api to list all groups a user belongs to:

     

    https://graph.microsoft.com/v1.0/users/{UserID or User Email}/transitiveMemberOf/microsoft.graph.group?$count=true

     

    I've made a test for your reference:

    1\Create a flow

    vbofengmsft_0-1659583307831.png

    2\Insert the flow into the app

    vbofengmsft_1-1659583364444.png

    3\Add a text input control and set it's OnChange property to:

     

    Set(GroupsBelongsTo,Bof0804_1.Run(Self.Text).groups)

     

    4\Add a datatable and set it's Items preoperty to:

     

    AddColumns(GroupTalbe,"IsBelongTo",ThisRecord.GroupID in GroupsBelongsTo)

     

     

    When we fill in the user to be found in the text box, the table will show which group he belongs to and which group he does not belong to

    vbofengmsft_2-1659583699139.png

    Best Regards,

    Bof

     

     

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard