cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

How to: Find all User Groups for a Given User

A_Wakde
5-Regular Member

How to: Find all User Groups for a Given User

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?

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

1 REPLY 1

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.

Announcements


Top Tags