Leiste mit Community-Erfolgen erweitern.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.
GELÖST

Extract user primary group in a report/API

Avatar

Level 9

Hello,

I would like to extract the primary group of a user. For instance, if Group A contains a subgroup Group B, which in turn has a subgroup Group C, and my Home Group ID is set to Group C in my Workfront profile settings, is it possible to retrieve Group A in a report or in an API response?


Thanks!

Themen

Anhand von Themen werden Community-Inhalte kategorisiert und Sie können so relevanten Inhalt besser finden.

1 Akzeptierte Lösung

Avatar

Korrekte Antwort von
Level 10

Hello Manish,

 

Using the API you need to work with a nested query. But I think that there is no possibility to find out how many layers your group structure has. So, if you know that the nesting is Group A -> Group B -> Group C you could do something like this:

https://<instancename>.my.workfront.adobe.com/attask/api/v18.0/user/search?fields=homeGroup:parent:parent:name&ID=<userID>

 

this looks for the homeGroup (Group C) of the User and asks for its parent (Group B) and the parent of Group B, which would be Group A.

 

If you do not know, if there is another level, unfortunately you cannot be sure to get the "Top-Group" with this approach.

 

Regards

Lars

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten

Avatar

Korrekte Antwort von
Level 10

Hello Manish,

 

Using the API you need to work with a nested query. But I think that there is no possibility to find out how many layers your group structure has. So, if you know that the nesting is Group A -> Group B -> Group C you could do something like this:

https://<instancename>.my.workfront.adobe.com/attask/api/v18.0/user/search?fields=homeGroup:parent:parent:name&ID=<userID>

 

this looks for the homeGroup (Group C) of the User and asks for its parent (Group B) and the parent of Group B, which would be Group A.

 

If you do not know, if there is another level, unfortunately you cannot be sure to get the "Top-Group" with this approach.

 

Regards

Lars

Avatar

Level 9

Hello Lars - This is useful. We have a maximum of four groups in hierarchy, so I will use it accordingly. Thank you! 😊