PowerApps / Check an user in Entra Group

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

  1. 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

  1. 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
    )
)
Share the Post:

Related Posts

PowerApps Patch Date

Patch is THE method for creating a record. It’s a magical method, because it also allows you to update information on the one hand, and target different data sources on the other.

Read More »

PowerApps Mettre à jour une date

Patch is THE method for creating a record. It’s a magical method, because it also allows you to update information on the one hand, and target different data sources on the other.

Read More »

PowerApps Patch / Update

Patch is the Swiss army knife for updating data in SharePoint. You need to specify which record you wish to update. Different methods are then possible.

Read More »

PowerApps Patch / Add new data

Patch is THE method for creating a record. It’s a magical method, because it also allows you to update information on the one hand, and target different data sources on the other.

Read More »