This video is here for showing how to get the names of everyone in a SharePoint Group and pull it into Power Apps and display in a Gallery.
Here are the formulas for the HTTP calls in Flow:
Get Principle ID of SP Group:(method: GET)
URI: _api/web/siteGroups/getByName(‘~displayName of SP Group~’)
Get SP Group Members Names: (Method: GET)
URI: _api/web/sitegroups(~Name of step before~?[‘d’][‘id’]})/users
~select~ call (the step to only grab the property ‘Email’)
From: ~step name of Get SP Members~?[‘d’]?[‘results’]
Map: @item()?[’email’]
~Compose~ step (join function to convert array to string)
Inputs: join(~select step Name~, ‘;’ )
Here are the logics for within Power Apps:
App.Onstart:
Set(~variable name for members from flow(Variable A)~,~name of Flow~.Run(“~URL of site SP Group is located (no “/” at the end)~”,”SP Group Displayname”).~variable name from Flow~);
ClearCollect(
~name of collection~,
Split(~Variable A~,”;”)
);
Auto Height of Gallery:
CountRows(~collection name~)*~Gallery Name~.TemplateHeight+(CountRows(~collection name~)*~GalleryName.TemplatePadding~)
Label for Full Name of each person in Gallery:
Office365Users.UserProfile(ThisItem.Value).DisplayName