Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Show AD members (display name/email) in Power App gallery items

(0) ShareShare
ReportReport
Posted on by 102

Hi,

I am working on an app that  fetches Azure AD groups based on amount value and stores the names of the groups in SharePoint column (Person/Group type).

In the Gallery, I have multiple rows in the following format.

muzzamal_0-1686673356487.jpeg

 

 

The AD Groups in the gallery are fetched from SP column (person/group type) using the code:

ThisItem.ADGroup1.DisplayName 

ThisItem.ADGroup2.DisplayName

 

In the gallery items, is it possible that I can show the members of each group?
For example, there are 3 users in UserGroup1, so I want to show the members of that group (emails of group members or display names)

So the gallery view can be 

 
muzzamal_1-1686673356370.jpeg

 

Thanks

  • Shaheer Ahmad Profile Picture
    2,194 Super User 2025 Season 1 on at
    Re: Show AD members (display name/email) in Power App gallery items

    Yes, it is possible to show the members of each Azure AD group within the gallery in your Power App. To achieve this, you can utilize the Microsoft Graph API to retrieve the group members based on the group ID.

    Here's the approach you can follow:

    1. Make sure you have the necessary permissions and access to call the Microsoft Graph API in your Power App. You may need to register an Azure AD application and configure the required API permissions.

    2. Within your Power App, in the Items property of the gallery, you can use the following formula to retrieve the group members for each AD group:

     

     

    ForAll(
     GalleryItems,
     {
     Group: ThisItem.ADGroup1.DisplayName,
     Members: Office365Groups.GetGroupMembers(ThisItem.ADGroup1.Id).value
     }
    )

     

     

    Replace GalleryItems with the name of the collection or data source that contains the rows you want to display in the gallery. ThisItem.ADGroup1.DisplayName should be replaced with the appropriate column reference containing the Azure AD group display name for each row.

    1. In the gallery, you can now access the members of each group using the Members property. For example, you can display the email addresses of the group members:

     

     

    ThisItem.Members.Email

     

     

    Or, you can display the display names:

     

     

    ThisItem.Members.DisplayName

     

     

    By using these formulas, you should be able to display the members of each Azure AD group within the gallery in your desired format.

    Please note that calling the Microsoft Graph API may require additional configuration and setup, including registering an Azure AD application and obtaining appropriate permissions. Ensure that you have the necessary permissions and consult the Microsoft Graph documentation for further guidance on calling the API.

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