Forums

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

Get all users of a group for automation

Alexander Ziegltrum
Contributor
September 13, 2023

Hey 👋,

in an automation, in which we create software projects automatically, I want to add the members of a specific group to be the project admins.

It already works, when parsing the given users from a user picker field and use it in a "for each" branch and hand it over to this web request: https://<myinstance>.atlassian.net/rest/api/3/project/{{JiraProjectKey}}/role/10018 where {{JiraProjectKey}} is the chosen key and '10018' is the role ID of the project admins.

2023-09-13 11_37_13-Automation - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

2023-09-13 11_47_34-Automation - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

By default all members of a specific group should be assigned as project admins.

It does not work this way, when I put the user group ID into the web request:

2023-09-13 11_48_41-Automation - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

Audit log reports this error:

2023-09-13 11_43_33-Automation - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

Any ideas how that can be done?

 

--- Edit ---

And I found the answer. The request payload was invalid.

Instead of using "user": it must be like:

{
"groupId": [
"a1234567890123456789123456789b"
]
}

That works as intended and adds the referred group as Project Admins - in our case 😉

Cheers!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events