Delete users from Atlassian Cloud


We have to delete a bunch of users from Atlassian Access. I’ve found the delete user API on the developer platform.
I know that it says that it’s experimental, but I get the following error, also with non-experimental API calls from this page:

So I am using exactly this script: ``// This code sample uses the ‘node-fetch’ library
const fetch = require(‘node-fetch’);

fetch(‘’, {
method: ‘DELETE’,
headers: {
‘Authorization’: Basic ${Buffer.from( '<api_token>' ).toString('base64')}
.then(response => {
Response: ${response.status} ${response.statusText}
return response.text();
.then(text => console.log(text))
.catch(err => console.error(err));`Preformatted text``
By adding my domain, my e-mail address and my API key (retrieved via Atlassian Access).
But I get the following error:

Response: 401 Unauthorized
Basic authentication with passwords is deprecated.  For more information, see:

I also tried with my API key found via id .atlassian. net.

Anyone ideas?

Thank you in advance.


I can think of only one thing as you are already using API token method and trying this via node script. In delete user API docs, it is mentioned " Permissions required: Site administration (that is, membership of the site-admin group).". Can you please make sure the account from which you are trying to delete users have site-admin permissions?



I confirm that I have site-admin permissions for this account.