I want group membership of user of type system administrator. I used

Certified Associate Developer
I want group membership of user of type system administrator.

I used getgroupsformemberuser() to get list of groups where user is member.
I used getgroupsforadminuser() to get list of groups that a given user is an administrator but it returns system groups. For basic user, same function returns list of groups that a given user is an administrator.

Is there any other function i can use?

OriginalPostID-215085

OriginalPostID-215085

  Discussion posts and replies are publicly visible

Parents
  • To determine the system admins, you can run the following expression:

    =load(
    local!designerUsers: getdistinctusers(getgroupbyname("Designers")),
    local!adminUsers: apply(fn!isusersystemadministrator,local!designerUsers),
    index(local!designerUsers,where(local!adminUsers),{})
    )

    The default Designers group contains all system admins by rule, but non-admin users can be added to the group so the second step is needed.
Reply
  • To determine the system admins, you can run the following expression:

    =load(
    local!designerUsers: getdistinctusers(getgroupbyname("Designers")),
    local!adminUsers: apply(fn!isusersystemadministrator,local!designerUsers),
    index(local!designerUsers,where(local!adminUsers),{})
    )

    The default Designers group contains all system admins by rule, but non-admin users can be added to the group so the second step is needed.
Children
No Data