@Anonymous
Although you can consider the Custom Connector as mentioned by @v-bofeng-msft , this will incur licensing considerations as the custom connectors are consider a premium connection.
However, the steps taken can be done completely with the AzureAD connector now.
If you want to get a list of all the security groups that the current user is a member of, then you can utilize this formula:
ClearCollect(colADGroups, AddColumns(AzureAD.GetMemberGroupsV2(User().Email, true).value, "theGroup", AzureAD.GetGroup(Value)))
Note: this particular function is a behavioral function and must be done in a behavioral action. In this case I am collection the list of groups. Also, I am adding a column to the collection that will have the actual Group details in it - which is gathered by GetGroup.
At this point, your Gallery (if you were to use one) would have an Items property of colADGroups and you could display the information in a few labels - example ThisItem.theGroup.displayName, etc.
If your intention is to just check membership in the group, then you can utilize a formula such as this:
ClearCollect(colADGroups, AddColumns(AzureAD.GetMemberGroupsV2(User().Email, true).value, "groupName", AzureAD.GetGroup(Value).displayName))
(remember: you need to do this in a behavioral action)
Then you can check against that collection for the name of the group you are interested in.
Or, perhaps a more elegant solution (since you just want to know membership in that particular security group) - Set a variable:
Set(IamInTheGroup,
CountRows(
Filter(
AddColumns(AzureAD.GetMemberGroupsV2(User().Email, true).value,
"groupName", AzureAD.GetGroup(Value).displayName),
groupName = "yourSecurityGroupName"
)
) > 0
)
If the user is in the security group, the IamInTheGroup variable will be true.
No additional licenses needed.