I don't have much experience with scripting so I want to ask if anyone has set up ScriptRunner automation rule for removing users from an organization or can recommend some approach.
Hi @Brad Butchers ,
you can send DELETE request to the Service Management's API. Even though it is experimental, it worked for me, I just needed to provide additional header:
It is not clear from the documentation, but you need to provide list of usernames, which you want to remove from the organization. So the request body is the same as when you are adding users to the organization, something like:
Example of how to send request can be found here.
Excellent thanks, what would the script look like thought? I'm new to the groovy/java scripting for script runner but i did run these through postman and they work for me too.
For an automation rue to work firstly I would need to know how to get the username from a custom field to use as the user to remove. How would I do this?
Second would be to get the organization that user belongs too. How would I do this too?
Hello there Cloud Community members! Today, we’re thrilled to announce Jira Service Management, the next generation of Jira Service Desk. Jira Service Management touts advancements in IT service ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events