Forums

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

Cannot delete user error in script runner bulk deletion

Bhargavi January 1, 2021

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
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.
January 1, 2021

Hi @Bhargavi

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

https://confluence.atlassian.com/adminjiraserver/connecting-to-an-ldap-directory-938847052.html

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?

Regards,
Daniel

Bhargavi January 1, 2021

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.

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.
January 1, 2021

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

Daniel Ebers
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.
January 1, 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.

Bhargavi January 1, 2021

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
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.
January 1, 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