Create a flow that takes variables from PowerApps,
check is user is in a group,
and returns a variable with the result.
1. create an Instant cloud flow that can be started from Power with a button.
2. create the in variable from PowerApps
Rename it as the variable Name
For Value ask it from PowerApp
3. Send an HTTP request to SharePoint,
_api/web/sitegroups/getByName(‘use inGroupnameValue’)/Users?$filter=Email eq ‘use inGroupName_Value’
_api/web/sitegroups/getByName('@{triggerBody()['inGroupName_Value']}')/Users?$filter=Email eq '@{triggerBody()['inUserEmail_Value']}'
(or if you use Get my profile )
test the output.
body('HTTPrequest')['d']['results']
4. To test it out.
Create canvasApp with a button on it. add the connection to the flow created above.
On Button select Run the flow, and pass the variables.
'flow_name'.Run( "groupName", "email@email.com" )
5. check the array value returned from HTTP is greater than 0
In PowerApp:
UpdateContext( { result: 'Flowname'.Run( txtUserGroup.Text, txtUserEmail.Text ) } ); Set( isAdmin, If(result.outisuser = "True", true, false))