How to add uninvited users to groups using REST API on Atlassian Cloud
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
This article provides an overview of adding uninvited users to groups in the new user management experience using the Organizations REST API, particularly in situations where:
- Users and groups are not provisioned via SCIM
- Or the Atlassian Account is not listed under Directory / Users section in admin.atlassian.com
In the above two scenarios, if you use the Add user to group endpoint you will run into the User not found error with 404 response:
Environment
- Atlassian Cloud
- This only applies to the Centralized user management interface
Solution
Pre-requisites
- The steps will only work if the organization has a Jira product
- Organization Administrator with admin API key to use the Organizations REST API
- User API key to be used with Jira Cloud REST API
We will break the process into two steps mentioned below:
- Invite the managed account to be visible under Directory / Users using the Create User API request
- Then the Add user to group endpoint can be used to add the user to the group
Below is the detailed set of instructions that will help you to add a managed account to a group:
Step 1 | Step 2 | |
---|---|---|
API | Create User API | Add user to group |
Request Method | POST | POST |
Request URL | https://<site-url>/rest/api/3/user | https://api.atlassian.com/admin/v1/orgs/{orgId}/directory/groups/{groupId}/memberships |
Request Body |
|
|
Authentication Method |