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

How to delete user avatar / remove with script runner


Is there a way to delete or change the user avatar by using script runner?

With the EU GDPR / EU DSVGO we must remove personal user data after a employee left the company.

Some users upload own pictures into JIRA and I need to remove or change it to a default avatar when a user is set to inactive by LDAP.

As far as I know the avatar is saved as base64 in the database. But we don't want to change something direct in the database.

I should get the users with a change of this example script:

I found a script ( that is doing some avatar upload but isn't working as expected.

Has anybody created a script that is working?

Best Regards


3 answers


Have you tried setCustomUserAvatar method?

From JIRA API it sets a custom avatar for a given user.
setCustomUserAvatar(ApplicationUser remoteUser, ApplicationUser user, Long avatarId)

Oh, great. I will give a try.



its not hard. Please note that "setCustomerAvatar" is not enough here, since you have to delete them to fulfill the GDPR Requirments.

Basically you use the "userSearcherService" to get all inactive users, loop over them and use AvatarManager to delete the CustomAvatars.

We've configured this as a Service so it runs every month. If you still need help - i can share you my code as soon as im back in the office.

Hi Patrick,

Sounds good. It would be nice if you can provide me the code. 

Best Regards


Like Manuel likes this

Thanks a lot!

Simon I'm New Here Oct 01, 2020

Hi @Patrick,

can you please put the code online again?

Suggest an answer

Log in or Sign up to answer

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