web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show AD members (displ...
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

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard