Forum Discussion
Patrick Rote
Sep 19, 2025Iron Contributor
Best way to build a dynamic data driven navigation, that can be restricted based on security roles
Hi All, I'm in the process of designing a power app and would like to use the tab control or gallery for the menu. Looking for advice on how best to wrap authorization around the navigation for ex...
Patrick Rote
Sep 22, 2025Iron Contributor
Thanks Rob for the hint.
I would see if i can use the same logic using AAD security groups
ibmtomatoe
Sep 24, 2025Copper Contributor
Patrick Rote I use the following logic in App.OnStart for "role-based security". If the user is a member of the group, the variable is true, otherwise false.
//Call Microsoft Graph to get all groups the current user is a member of.
Set(
varMemberOfGroup,
Office365Users.HttpRequest(
"https://graph.microsoft.com/v1.0/me/transitiveMemberOf/microsoft.graph.group?$select=id",
"GET",
""
)
);
// 2) Build a lightweight collection of group IDs.
ClearCollect(
colGroupIds,
ForAll(
varMemberOfGroup.value,
{id: Text(ThisRecord.id)}
)
);
// 3) check if the Admin group GUID is present in colGroupIds.
Set(
varAdmin,
CountIf(
colGroupIds,
id = "xxxxxx-xxxxxxx-xxxx-xxxxxxx"// <-(GUID)
) > 0
);
// 4) Same approach as above but for the "Member" group GUID.
Set(
varMember,
CountIf(
colGroupIds,
id = "xxxxxx-xxxxxxx-xxxx-xxxxxxx"// <-(GUID)
) > 0
);
Using /transitiveMemberOf ensures nested group memberships are included.