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.
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
Thanks
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:
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.
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.
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1