Bulk Managing Users in Cloud

Hello Everyone,

We have seen requests from community users on managing users in bulk when

  • Giving the site access
  • Removing the site access
  • Adding the customers to a site
  • Removing Customers from site

Before we get into the concept, I would like you to refer to the links which are on the feature request.

Now that we have context what are the future plans of Atlassian on the topic we are discussing.

Let's look at how we can manage users in bulk when adding or removing users for now

We have an API to create or remove users from the site. Please note these APIs are experimental meaning this may be changed or continued forward with any advancements if needed.

API to Create (Invite) Users to Site

API Here

curl --request POST \
--url 'https://your-site.atlassian.net/rest/api/3/user' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"emailAddress": "username@company.com", "displayName": "Username", "name": ""}'

API to Delete (Remove) Users from Site

API Here

curl --request DELETE \
--url 'https://your-site.atlassian.net/rest/api/3/user?accountId=5d36b583beedf60c26aa372d' \
--user 'email@example.com:<api_token>'

The difference between deleting the user via API and deleting the user via UI is that you cannot remove the user from the site if the user is assigned an issue, reporter of an issue, project lead, component lead.

In this case, you can choose to remove the user from default groups from your site for each product.

API Here 

curl --request DELETE \
--url 'https://your-site.atlassian.net/rest/api/3/group/user?groupname={groupname}&accountId=5b10ac8d82e05b22cc7d4ef5' \
--user 'email@example.com:<api_token>'

How to get account IDs - Using the export option in Directory.

Export.png

How to get default groups - If you navigate to the product section, it lists down the groups which are part of the product and default group as well.

Default.png

Here's a link to a helpful article on how to bulk remove the users from the site using an add-on.

There are two add-ons as of now in the cloud to manage users in bulk (One here and another here) You could consider this as an alternative till the functionality in the cloud is released or you could write the script to manage users for inviting them over to the site or removing them.

If you need to get started with APIs, here's a link to start your journey.

Let us know in the comments if you have any thoughts or how you are managing the tasks when it comes to bulk managing the users.

Thanks,
Pramodh

3 comments

Bloompeak Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 11, 2022

Thanks for the useful information you provided.

There is also another Marketplace app, Manage Users for Jira Cloud developed by our team that helps you manage your Jira, Confluence and Service Management users in bulk. For further information, you can have a look at our article below.

An Effective Way of Managing Your Jira, Confluence and Service Management Users 

Like # people like this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Thanks for the article @Pramodh M .

I have not given this need a great deal of thought only because I have never needed to take action on members in bulk. If I did have the need I would want a solution implementation something like this:

  • ability to query users based on current filtering capabilities (active, inactive, product)
  • ability to select bulk edit for filtered list
  • ability to select action (deactivate, activate, delete (no please don't), add to group, remove from group, change product access, change site access)
  • ability to select all and individually
  • log everything
  • enable/disable notifications
Like # people like this

I am getting the below error when I am trying to delete the user using the below command.

curl --request DELETE --url https://cloud.atlassian.net/rest/api/3/user?accountId=xxxxxxxxxxxxxxxxxxxxxx --user example@mail.com:xxxxxxxxxxxxxxxxxxxxxx

Error: {"errorMessages":[],"errors":{}}

The same command worked fine 25 days ago.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events