How to add customer user directly by DB

Valentina Malavolta December 6, 2017

I try to create a new user by a insert in JIra DB cwd_user table. I see the user into Jira User Management Panel but it seems unable to be logged in.

user_management.png

It also misses information like directory and full name. 

This is INSERT QUERY:

INSERT INTO cwd_user (ID,directory_id,user_name,lower_user_name,active,created_date,updated_date,first_name,lower_first_name,last_name,lower_last_name,display_name,lower_display_name,email_address,lower_email_address,CREDENTIAL,deleted_externally,EXTERNAL_ID) VALUES (11620,1,'utest','utest',1,now(),now(),'utestnome','utestnome', 'utest gmail','utest gmail','utente utest gmail', 'utente utest gmail','utest@gmail.com','utest@gmail.com','{PKCS5S2}C850oEnhKd/VvsSCOAH395xN3cKNiYTWM8wn/vi4Fiud1wLXvupc1a+VwIuk37uy',NULL,NULL);

Thanks 

 

 

1 answer

1 accepted

3 votes
Answer accepted
Alexey Matveev
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.
December 7, 2017

Why would you add a user through SQL statement? You should not do it. If you want to add a user, a simple way to do it is to use Jira Rest Api

POST /rest/api/2/user

You can find more information here

https://docs.atlassian.com/software/jira/docs/api/REST/1000.1568.0/#api/2/user

Valentina Malavolta December 7, 2017

Alex Thank you  kindly :) It works!!!!!

Suggest an answer

Log in or Sign up to answer