How to conditionally add users to a JIRA group on creation in the Cloud?

Dylan Pokun
Contributor
October 20, 2020

Hello everyone,

I'm well aware as @Kristian Walker _Adaptavist_ mentioned that :

"it is not possible with ScriptRunner for Jira Cloud to set users as members of groups.

The reason for this is that the Add User to Group which Atlassian provide as documented here is marked as Apps cannot access this REST resource.

This means that ScriptRunner for Jira Cloud will be unable to make a call to this Rest API as it is only permitted to use the API's which Atlassian allow Apps to access."

But, please, what workaround is there?

The client really needs an automatic dispatch of users in groups on creation (manually managing 3000 users is not ok). 

I'm using an identity provider that is not SCIM-compatible. I initially thought that we could at least dispatch in groups with ScriptRunner after calling the IdP's REST API to get the groups infos, but here I am, stuck and quite surprised.

Thank you all in advance,

Regards,

Dylan

2 answers

1 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 20, 2020

Your "workaround" is "do it by hand", or to use an identity system that supports it.

The reason Scriptrunner cannot do this is as Kristian said - Cloud has no available API for this.  Other apps or scripts will have precisely the same problem - there is no call they can make to do this.

Dylan Pokun
Contributor
October 20, 2020

Thank you very much @Nic Brough -Adaptavist-. At least, now I know what I can say to the client.

I thought about a way though: developing a module for the identity provider (Keycloak), which would expose an API. Then, ScriptRunner would call it at the right time (on user created as an example) and the identity provider would call the "Add user to group" API with an API Token. It should work.

Thanks again.

Regards,

Dylan

0 votes
Sjoquist, Carl
Contributor
May 30, 2023

Hi - Is this still the case?  Is this API not accessible/functional for Cloud?  

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events