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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot delete user error in script runner bulk deletion

I am trying to bulk delete users through script runner(Userservice.removeUser).

Getting an error like Cannot delete user,the user directory is read-only.I have LDAP directories configured for user management.What does this error mean.

Appreciate any support provided.

Thanks in advance.



1 answer

1 accepted

0 votes
Answer accepted
Daniel Ebers Community Leader Jan 01, 2021

Hi @Bhargavi

an external user directory like LDAP can be either configured as read/write or read/only-directory.

The error message suggests you are in fact using a LDAP directory that is read-only.
Therefore Script Runner cannot delete the user - this is normal behaviour.

Could you please navigate to "user directories"

  • Choose Administration > User Management. 
  • Choose User Directories.

to check if the directory is a read-only one?


Hi Daniel,

Thanks for your quick response.

Yes my LDAP is configured with Read-only,with local groups permission.

So in this case what can I do to achieve bulk deletion automatically.Can you please suggest any way.

Really appreciate your support.

You need to do this in your LDAP service, as your Jira connection is read-only.

Daniel Ebers Community Leader Jan 01, 2021

With being read-only there is no way but to do it in LDAP.
If you can switch to read/write would need further knowledge of your LDAP backend, which we do not have here, and it would be too risky to recommend anything without knowing the infrastructure.

You really need to configure the users in LDAP.

Just for confirmation-So basically if LDAP directories are configured with Write permission in jira then we can perform bulk deletion with script runner or API.Is my understanding correct on this.

Thanks for your response.

Most Appreciated!!

Daniel Ebers Community Leader Jan 01, 2021

The basic idea is with read/write directories that you can "write" to them, f.e. disable users, yes.
If this is an option for your environment at all needs further inspection on your side.

In any case please review the link with documentation I posted above earlier.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,184 views 8 28
Join discussion

Community Events

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

Events near you