How to activate a user via Rest API in Cloud

Hi team, we are having problems updating a user via rest api, in particular reactivating the user after being deactivated/deleted.

How can I reactivate the user? Is there any issue reported around this?

With the new centralized user management, is it possible that a user is never actually deleted? just deactivated for the instance? It looks like there are 2 types of deactivated users, the ones deactivated in the host and the ones deleted from the host but still alive in the centralized user management. In the UI you can only see host deactivated users but not the deleted ones. But via rest, it’s possible to see both of them.

Could you clarify this?

Cheers
Fernando

Hi Fernando,

With the new centralized user management, is it possible that a user is never actually deleted?

When a user is “deleted” via the JIRA REST API, their Atlassian account is not deleted but they are removed from the site, as documented here.

However, according to that document you should still be able to change the active status of the user while still keeping them associated with a given site. We are investigating this on JRACLOUD-66936.

Regards,
Dave

Hi Dave, thank you for your reply and to point me to the right documentation.

‘Deleted/Unlinked’ users are still being returned in the GET /user methods as inactive. How do you relink/recreate them? Is it just re-activate them? It is not possible to use POST /user because user already exists elsewhere. Updating user fails for us with the internal server error

Another related problem we have in some host is /JRACLOUD-66936. For some hosts we cannot change groups membership at all with the error:

“Cannot edit group memberships, as external user management is enabled, please contact your JIRA administrators.”

Do you know why this happening in some instances (newer ones)?

Cheers
Fernando

Hi Fernando,

For the POST /user from the docs:

The user will be added to the requested site, assuming permission and license checks have been satisfied

  • If a user with the specified email address already exists in Atlassian account, that account’s information is used, and information sent in the API request (e.g. display name) is discarded
  • If no user with the specified email address exists in Atlassian account, a new Atlassian account will be created using the specified email and display name details
  • Passwords included in the request payload will always be ignored

We are investigating JRACLOUD-66936 as well. These problems are primarily attributable to the migration to centralized user management…JIRA is no longer a source of truth for users, and instead the JIRA user APIs are just proxies for internal APIs from our shared service. The occurrence rate of these bugs has increased as we’ve gotten closer to completing the rollout, so rest assured that we are looking into these issues with high priority.

Dave