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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Is there any API to get the roles of a User?

OP_11714882
4-Participant

Is there any API to get the roles of a User?

Is there any API to get all the roles of a specific user?

3 REPLIES 3
avillanueva
22-Sapphire II
(To:OP_11714882)

If you are referring to roles like in contexts like Projects, Libraries and Product areas, yes. Its a bit more complicated but each Role you see is actually a group so just WTGroup, or a group of a group. This was my Query Builder report to figure out the relationships. Starting with the Team (wt.inf.team.ContainerTeam), this is the main list of "Roles" for a context. That is linked to a groups (G1) via a RolePrincipalMap object. Finally the group which shares the same name as the role (CCB in my image which is a WTGroup), holds the list of users.

avillanueva_0-1733835305714.png

Its a bit complicated so you'll need a few APIs to get your answer.

@avillanueva
could you please share your report?

 

Following your directions I am a little bit in trouble to recreate it in my system.

 

Thank you

 

Marco
avillanueva
22-Sapphire II
(To:Marco_Tosin)

Zipped QML loaded. You can remove any of the conditions  that do not apply for you.

Announcements


Top Tags