Skip to main content
5-Regular Member
October 14, 2025
Solved

How to: Find all User Groups for a Given User

  • October 14, 2025
  • 1 reply
  • 406 views

Could you please tell me how to find User Groups for the logged-in User? because right now I am facing difficulties to find it. Could you help me in this?

Best answer by nmutter

you can do this like

let result = Users[principal].GetGroups();

There is a "global" variable named principal which holds the executing users username.

Or you can also user the following

let result = Users[Resources["CurrentSessionInfo"].GetCurrentUser()].GetGroups();

 

I always use the principal variable.

1 reply

nmutter16-PearlAnswer
16-Pearl
October 14, 2025

you can do this like

let result = Users[principal].GetGroups();

There is a "global" variable named principal which holds the executing users username.

Or you can also user the following

let result = Users[Resources["CurrentSessionInfo"].GetCurrentUser()].GetGroups();

 

I always use the principal variable.