Bulk deactivate Atlassian accounts using Postman and REST APIs

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

When to use this article

This article may be used any time there is a need to disable/deactivate Atlassian accounts in bulk. If an end user has a deactivated Atlassian account, then that user is not able to access any Atlassian Cloud service. It is only possible to deactivate Atlassian accounts that your organization manages - What are managed accounts?

When not to use this article

This article will not work for organizations with users and groups provisioned with Atlassian Guard SCIM, as these users will be recreated following the next update/synchronisation. Please refer to your identity provider administrator to make changes to users provisioned through SCIM.



Identify your organisation’s user management UI experience

  1. Head to admin.atlassian.com. Select your organization if you have more than one.

Original

Centralized

As a site administrator or organization admin, Users is found under the Product site. If the Users

page is not present under the Directory tab, then you have the Original user admin UI

experience.

As an organization admin, Users is found under Directory tab.

Prepare data

  1. Go to admin.atlassian.com. Select your organization if you have more than one.

  2. Navigate to Users > Managed accounts.

  3. Select Export members.

  4. An email will be sent when the CSV file is ready to download. Check your junk or spam folder if it’s taking a while.

  5. Open the email and select Download CSV file. If you’re not logged in, you may need to log in before the download will begin.

  6. Using a spreadsheet program or text editor, remove all rows that should not be deactivated, for example, organization administrators.

  7. Ensure that the user executing the deactivation is removed.

  8. Ensure the column "Atlassian ID" (the Atlassian account id) is not removed during cleanup.

  9. Save the CSV, which now contains a list of all users' Atlassian accounts to be deactivated.

Set up Postman

This section may be skipped if:

  • a collection named "Atlassian Cloud User Management (Org API key)" has previously been set up, and

  • an environment named "Atlassian Cloud (with Org API key)" has previously been set up

Click here for instructions to set up Postman

Download Postman

  1. Download Postman from https://www.postman.com/downloads/

  2. Run Postman.

Create a new environment

  1. Click New, or type Ctrl + N (Windows/Linux) or Cmd + N (MacOS).

  2. Select “Environment”.

  3. Name the environment “Atlassian Cloud (with Org API key)”.

  4. Set up the following variables:

    VariableTypeInitial value and Current valueComments

    cloudUrl

    default

    https://<yoursite>.atlassian.net

    Replace yoursite with your subdomain, e.g. acmecorp

    orgApiKey

    secret

    From admin.atlassian.com

    Manage an organization with the admin APIs

    organizationId

    default

    <yourOrganizationId>

    Provided at the same time as the organization API token

    Can otherwise be obtained from the relevant URL starting with https://admin.atlassian.com/o/

    Note that Postman variables are case-sensitive.

  5. Click Save towards the top right corner.

Create a new collection

  1. Click New, or type Ctrl + N (Windows/Linux) or Cmd + N (MacOS).

  2. Select “Collection”.

  3. Name the collection “Atlassian Cloud User Management (Org API key)”.

  4. Click the “Authorization” tab.
  5. Change Type to “Bearer Token”.

  6. Specify {{orgApiKey}} as the Token. The text should be coloured orange, indicating that Postman has recognized a variable has been specified. This can be confirmed by hovering over the variable name.

  7. Click the “Tests” tab.

  8. Enter:

    pm.test("Request successful", function () {
        pm.expect(pm.response.code).to.be.oneOf([200,201,202,204]);
    });


    This allows us to ensure all REST APIs have been made successfully.

  9. Click Save towards the top right corner.

Set up REST API call

  1. Click New, or type Ctrl + N  (Windows/Linux) or Cmd  + N (MacOS).

  2. Select "HTTP".

  3. Name the request "Deactivate Atlassian account".

  4. Change the method from GET  to POST .

  5. In the URL, paste:

    https://api.atlassian.com/users/{{Atlassian ID}}/manage/lifecycle/disable
  6. Click the "Authorization" tab.

  7. Ensure Type is "Inherit auth from parent".

  8. Click Save , saving into the "Atlassian Cloud User Management (Org API key)" collection.

Execute runner 

  1. Change the environment using the environment selector at the top right of Postman, selecting "Atlassian Cloud (with Org API key)".

  2. Select Collections in the sidebar.

  3. Select the "Atlassian Cloud User Management (Org API key)" collection.

  4. On the Overview tab, select ▶️ Run towards the top right corner.

  5. Under Run order, ensure there is one and only REST API call - "Deactivate Atlassian account".

  6. On the Functional tab, select Run manually.

  7. Click Data.

  8. Navigate to and select the previously prepared CSV file.

  9. Reduce the number of "Iterations" under Run configuration to 1.

  10. Leave Advanced settings as is.

  11. Click Run Atlassian Cloud User Management (Org API key).

  12. Check Postman to ensure the runner collection has passed all tests. The run results should show:

    1. "Iterations" and "All tests" to be equivalent in count

    2. Passed (n) where n is the number of iterations

    3. Failed (0)

    4. Skipped (0)

  13. Check the Managed accounts page to ensure the Deactivated count of users has increased by 1.

  14. Rerun Postman Runner following the previous steps, with the number of "Iterations" set to the number of rows in the CSV file. One error may be expected as it is not possible to deactivate a user that has already been deactivated.

References


Last modified on Jun 5, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.