create new user with sql query

hi,

I wont to create new users directly from database, how i can do it? maybe somebody have done sql query?

1 answer

1 accepted

This widget could not be displayed.
Alexey Matveev Community Champion Dec 19, 2017

Thanks for your answer, but can i do it with sql? I use Jira server

You should not use SQL to modify any data in Jira. Your Jira will become unreliable and prone to errors and unexpected behaviour

For SQL inserts:

  • Take your Jira service down.
  • Take a full backup of the database with your database tools.
  • Restore this on a test system to ensure it is valid.
  • Run the SQL to hit the 4-8 tables you need to amend/insert into
  • Restart Jira
  • Re-index it
  • Test every area of user interaction works for an old user and the new one
  • In 99.99% of cases, roll back the backup you took earlier because testing fails and you've found you've got a broken Jira.

But seriously, use REST.

Thank you. Maybe you have some guides how to do it with REST?

Alexey Matveev Community Champion Dec 20, 2017

Kindly read the documentation I provided.

You should execute POST /rest/api/2/user with payload

{ "name": "charlie", "password": "abracadabra", "emailAddress": "charlie@atlassian.com", "displayName": "Charlie of Atlassian", "applicationKeys": [ "jira-core" ] }

That is all you should do.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you