Before adding a user to an Entra group, you need to check that the user is not already present. Two methods are available
Add Microsoft Entra ID Connector
- You must add Microsoft Entra ID connector in your Datasource PowerApp

CheckMemberGroup method
1. This method lets you know if the user is already in the Entra group
Set(
Foo,
If(
!IsEmpty(
MicrosoftEntraID.CheckMemberGroups(
email@domain.com,
["7hsd570-6g99-6eklo-effg-8jsdl972jdzx"]
)
),
true,
false
)
)
GetGroupMembers
- With this method, you obtain a list of users in the group and compare them with the current user.
Set(
Foo,
User().Email in
ShowColumns(
MicrosoftEntraID.GetGroupMembers("7hsd570-6g99-6eklo-effg-8jsdl972jdzx").value,
mail
)
)