Hi @Greg27
In general, you can use the following formula in your app (best done in OnStart or OnVisible or some other trigger):
Set(glbGroupMembers,
AddColumns(AzureAD.GetGroupMembers(<groupIDhere>).value,
"_lastFirst", surname & ", " & givenName
)
)
Since this is a security group, you will need to use the AzureAD connector for it.
An Office 365 group is different than an AD group when dealing with security groups.
You will need to know the group ID in order to get the names.
If you want to include multiple groups, then I would suggest the following:
Set(glbGroupMembers,
Ungroup(
Table({GroupName: "Group1",
Items:
AddColumns(AzureAD.GetGroupMembers(<group1IDhere>).value,
"_lastFirst", surname & ", " & givenName
)
},
{GroupName: "Group2",
Items:
AddColumns(AzureAD.GetGroupMembers(<group2IDhere>).value,
"_lastFirst", surname & ", " & givenName
)
},
{GroupName: "Group3",
Items:
AddColumns(AzureAD.GetGroupMembers(<group3IDhere>).value,
"_lastFirst", surname & ", " & givenName
)
}
),
"Items"
)
)
)
This will give you all the groups into one table with an identifying GroupName to distinguish them.
If for some reason you really want to avoid the Azure connector, there is no real way to do that with the 365 connector as it is a different type of group. If your group is defined in both places (linked), then you can "try" the 365 connector for groups, but if not, then the Azure connector is needed.
If you absolutely have to avoid it (which I am not seeing a specific reason to do so), then you would need to go with a separate list with the users in it that is created by PowerAutomate or another PowerApp to sync the members of a group to the list...then you can use that list as the source in your formulas instead (much simpler formula than above).
I hope this is helpful for you.