Create JIRA user from Connect add-on via REST API

I’m working on an addon for JIRA Cloud using Atlassian Connect. My addon has ADMIN and ACT_AS_USER scopes.

I would like to create a new user from my add-on. Unfortunately, my POST /user requests end up being redirected to login, regardless of whether I authenticate as add-on or acting user (who is a site admin).

I checked the documentation on scopes, and it shows N/A for POST to /user. Does it mean that this endpoint is not available to Connect add-ons at all?

What can I do to create a user from a Connect add-on?

I’m afraid so, yes.

I believe the best you can do is redirect the user to the User Management area of JIRA.

1 Like

You are probably wondering: why does Atlassian not give me the ability to create users via my add-on and will they ever implement that in the future?

The answer is probably: Atlassian will never implement this.

The number of users in an Atlassian Cloud instance is what Atlassian charges customers for. Add-ons are also paid by the number of users that can use the add-on.

Atlassian promises our customers that their ‘site-admins’ are the ones that are in control of the Bill. They decide how many users and add-ons that they have installed, and thus how much they pay every month. Allowing add-ons to create users directly would break this trust.

What is more likely to happen in the future is a “Request to create user” flow. Where an add-on, or non-admin, can hit a REST resource that puts the user in a backlog that the ‘site-admins’ could then approve. That would achieve both requirements, add-ons could start the process for getting users created while site-admins still have full control.

However, I can tell you that implementing this functionality across our products is, at this point in time, not going to happen in FY18. If you want to see something like that happen then I recommend that you raise an issue in the AC project on ecosystem.atlassian.net.

In the meantime, David’s suggestion is probably your best option.

P.S. You have not stated why you want to create users via your add-on. What are you trying to do?

3 Likes

Thanks Robert. I understand the reason, and I was expecting this to be true. I know what the implications would be, and I would definitely make sure our customers knew and understood all this.

The thing we’d like to build would be a tool for site admins managing large and complex JIRA instances. Possibly many of them. Possibly even some server and some cloud installations, or migrating between these environments.

I’m looking for a way to access the pieces of admin functionality that apparently Atlassian is not going to provide an API for either. Things like all the project schemes, for instance. Having a user with password would let me authenticate with JIRA, and communicate with its other APIs, not just the official REST API. It’s really just a workaround for incomplete API.

I understand it’s not quite ideal, does not sound like a very easy thing to build and maintain, and pretty fragile as well. All the usual issues with non-public APIs, yuck.

Hi there
Thanks for this post … And the response @rmassaioli
We would also like to do something like this to add to our automated processes for staff joining and leaving our employ. I.e. we kick of the process from an internal system that goes on and creates all the accounts and users on platforms we use.
This was last updated in 2017 - is there any new development or changes regarding managing users (create, deactivate or delete) via the API via the Connect App?
Thank you