Forums

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

Issue during user creation

Chaitanya M
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 13, 2024

Cannot create user with same username as a deleted user.

When we try to create the users with the same name that is already deleted from the UI months back. We are getting below error message.

{"errorMessages": [ "A user with that username already exists."], "errors": {}}

  1. Is this an expected behavior?
  2. If this is an expected behavior could please elaborate about this.

1 answer

0 votes
Trudy Claspill
Community Champion
June 14, 2024

Hello @Chaitanya M 

Welcome to the Atlassian community.

How was the account originally created? 

How exactly did you delete the account?

What process are you going through now to try to create the account?

It is possible that since you deleted the account somebody else has created an account with the same username.

Chaitanya M
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2024

Hi @Trudy Claspill,

I used Jira rest Api's to perform all the operation which are mentioned below:     

I'm creating and deleting the user using the Jira rest api call.   

Creating the user: https://your-domain.atlassian.net/rest/api/2/user

Deleting the user: https://your-domain.atlassian.net/rest/api/2/user?accountId=                                        

I am using above Create API call to create the account. No one is using this account expect me.

If I try to create the user with the same name, that I have already deleted it is showing the response mentioned in the query.

Trudy Claspill
Community Champion
June 19, 2024

Hello @Chaitanya M 

It appears that you are using this API endpoint.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-delete

Notice the description for the function:

Deletes a user. If the operation completes successfully then the user is removed from Jira's user base. This operation does not delete the user's Atlassian account.

When you use this API to delete a user you are only removing them from the Jira instance. You have not removed their account entirely from Atlassian Cloud.

Since an Atlassian Cloud account with the same email address continues to exist, you can't use the Create User endpoint to create it again.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events