"User does not exist" error

Filiph Petzäll January 30, 2020

We're experiencing some issues with one of our users. We use AD-sync and I've seen questions like this but those seem to have a problem with all AD users and in our case this is just the 1 user.

Nothing differs between this one and another (working) user and a Test remote directory connection shows no errors and says Succeeded on all 7 tests, never the less the user is not able to login to our JIRA Servicedesk portal. Also; the user is listed in User Management - Users.

Any tips are greatly appreciated! 

3 answers

1 vote
Javidan Amiraliyev March 1, 2021

It's possible to fix it by updating user via ScriptRunner:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.ApplicationUserBuilderImpl
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.util.UserManager

def userManager = ComponentAccessor.getUserManager()
def userUtil = ComponentAccessor.getUserUtil()

//userkey of the problematic user. It can be found on database
ApplicationUser user = userManager.getUserByKey("JIRAUSERXXXXX")

//builder to update the user
def builder = new ApplicationUserBuilderImpl(user)

//new username
builder.name("newusername")

//update user
userManager.updateUser(builder.build())

Jira uses "Username" field to update user on User Management page. That's why it throws NullPointerException. They should use UserKey.

Sofia Quintero May 13, 2021

@Javidan Amiraliyev did you tried it?

Like Javidan Amiraliyev likes this
Javidan Amiraliyev May 13, 2021

@Sofia Quintero yes, I've tried it. It works. Did you try it?

Sofia Quintero May 13, 2021

I want to try it, but where do i have to execute the script? in wich options of script runner? 

Does it work in Jira Software Server ?

Javidan Amiraliyev May 14, 2021

ScriptRunner has a console that you can use to execute scripts.

Stacy Haller August 3, 2021

@Javidan Amiraliyev 

I have this issue currently on one id that was set-up incorrectly.

I tried to run the script you gave, but I'm getting the null pointer error when I try even that...

java.lang.NullPointerException at com.atlassian.jira.bc.user.ApplicationUserBuilderImpl.<init>(ApplicationUserBuilderImpl.java:21) at Script324.run(Script324.groovy:13)

I am not good at running or debugging scripts, so if anyone could help me out - that would be very much appreciated.

Thanks!

Javidan Amiraliyev August 3, 2021

@Stacy Haller 

Did you get the user_key from "app_user" table? You need to replace "JIRAUSERXXXXX" with the user_key of the user.

Stacy Haller August 4, 2021

@Javidan Amiraliyev 

I found the app_user table, but I'm not finding an entry with JIRAUSER for this person.  Did you search using the lower_user_name from the cwd_user table?

Thanks again!

Filiph Petzäll August 31, 2021

Even though I've solved it for us in another way, I'd still like to help others that may experience the same issue. I'd like to know if I should mark this as an answer, please let me know if this is a solution that works for you all so I can press "accept answer" on this, thanks! 

Like Javidan Amiraliyev likes this
1 vote
Andrey Kravtsov January 11, 2021

Hello @Filiph Petzäll , @Antonio Francis ,

did you manage to find the root cause of this problem? Or a solution?

I experience the same problem with one user.

On the database level the record in cwd_user looks good: values of First Name, Last Name etc are filled, but under User Management the user look like:

Bug- User not found 1.jpg

Kind Regards,

Andrey

Filiph Petzäll January 11, 2021

Hello @Andrey Kravtsov

Unfortunately no, I did not manage to find the cause of the issue, however I did get it to work by deleting the user (in AD) and create it anew.

Sorry if this is not helpful to you. We needed a fix quite fast and this did the trick so thats what we went with.

Filip Škledar January 22, 2021

@Andrey Kravtsov  Did you manage to find any another solution for this problem?

Andrey Kravtsov January 22, 2021

@Filip Škledar, this problem was on our server floating. After my initial post here I met only one another user with the same problem. Meanwhile both those users and generally any other user on the server looks ok. We did not perform any Jira updates over this time. It is really strange what has happened.

Filip Škledar January 22, 2021

@Andrey Kravtsov I have the problem on server too. Thanks for fast replying I hope i will find solution.

 

Kr,

Filip

Tejasvini_Apraj December 27, 2022

Hi @[deleted] 

Did you find any solution to your issue? I am having the exact same issue.

0 votes
Antonio Francis March 4, 2020

User does not exist.PNGHi Filiph,

 

I am having a similar issue with two users. I have created an account in Jira (Cloud) for them and when I go to assign test cases to them their name does not appear. I went to check in their profiles and it says they don't exist although their account is created. It seems like an AD issue to me and not a Jira issue because the other 100 odd users I have created are fine.

Is this issue similar to yours?

See my attachment.

Regards,

Tony.

Filiph Petzäll March 20, 2020

Hi Antonio, and thank you for engaging!

Yes and no. I cannot assign the user as reporter in cases and such, those things are the same as in your issue. since we use AD-sync we do not create accounts in JIRA manually so I did not create the user. The account is however created, and looks like this in JIRA:
User.png

If i click the user, I land on this page;

user2.png

I do not know if the problem is in AD or in JIRA, but I lean towards that this is JIRA-related since I copied the exact same user in AD and that user worked to log into the portal. So to clarify, an identical AD account works, but not the original user...

Suggest an answer

Log in or Sign up to answer