Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Managing users and roles


Good day. 

We audit roles and permissions in all Jira projects. Users, who have project admin add other employees to project roles locally. 

Every project has AD group and we want that all users request this groups from company portal. We want to get away from local rights. 

So, we have many projects with users, who added locally by project admin. 

For example: 


g_jira_123 - AD group;

Valeriya - employee, who was added by project admin. 


Is there any way to remove all this users from all projects? 


Jira Server 8.5.3


2 answers

1 accepted

0 votes
Answer accepted

Hi @Andrey Butuzov 

Do you have ScriptRunner for Jira on your server instance? If yes then doing this is quite straight forward using ProjectRoleService.

ProjectRoleService projectRoleService = ComponentAccessor.getComponent(ProjectRoleService)

This post has a good example.


Hi @Ravi Sagar _Sparxsys_ 

Thanks for your reply and tutorials from YouTube :) 

Yes, we have ScriptRunner. 

Will try to study. 

I'm beginner in ScriptRunner. Can you suggest where I should to place this code? 

Screenshot 2021-08-20 at 11.02.33.png

I know that my question is very simple, sorry for that :) 

Like Ravi Sagar _Sparxsys_ likes this

Thanks. You can run ad-hoc code from the Console.

Like Andrey Butuzov likes this
0 votes

You could do some data mining with REST{projectIdOrKey}/role


Each "project role member", aka "actor" has a type property, whether it's a user or a group, so for example:


"self": "",
"name": "Administrators",
"id": 10002,
"description": "A project role that represents administrators in a project",
"actors": [
"id": 146569,
"displayName": "jira-administrators",
"type": "atlassian-group-role-actor",
"name": "jira-administrators",
"avatarUrl": ""
"id": 238429,
"displayName": "Radek Dostal",
"type": "atlassian-user-role-actor",
"name": "supersecretname",
"avatarUrl": ""


The types are either 'atlassian-group-role-actor' or 'atlassian-user-role-actor'. So doing some data mining you would get something akin to project:role:user list(s) and then you could delete those actors with REST again{projectIdOrKey}/role-deleteActor


You could do the same thing with java/groovy if you have a plugin allowing you to run groovy scripts, but it's essentially the same thing as with REST, get role actors, identify which ones are users, delete.


Other than that there is no way to do any such a purge like this in bulk through Web UI. 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events