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’
(or if you use Get my profile )
test the output.
[code] body(‘HTTPrequest’)[‘d’][‘results’][/code]
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.
[code] ‘flow_name’.Run(
"groupName",
"email@email.com"
)
[/code]
5. check the array value returned from HTTP is greater than 0
In PowerApp:
[code]UpdateContext(
{
result: ‘Flowname’.Run(
txtUserGroup.Text,
txtUserEmail.Text
)
}
);
Set( isAdmin, If(result.outisuser = "True", true, false)) [/code]