Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bulk delete portal customers - Automation Query

Natalie Waters December 12, 2023

Hello!

Currently trying to follow this article - Automation: Bulk delete portal customers

Can anyone elaborate on why I'm receiving the following error:

Error publishing web request. Response HTTP status:

403
Error response HTTP body:
{"errorMessages":["error.no-permission"],"errors":{}}


I have a feeling it's to do with the "Authorization" field but due to the lack of information on the guide I'm stuck.

Does anyone know how and where I can attain this info --> Screenshot 2023-12-12 at 16.20.02.png

I've built out the below:

Screenshot 2023-12-12 at 16.21.36.pngScreenshot 2023-12-12 at 16.22.57.png

 

Any help will be greatly appreciated.

2 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2023

Hi @Natalie Waters 

I think you need to create an API key on your account.

This will provide you with the information to fill in the Authorisation field

Basic and the API key.

Here is the article to create your API key

Natalie Waters December 18, 2023

Hiya,

Thank you for that.

I've created an API key on my account and input those details but it's now just running an unending task without actions.

I've most likely input the incorrect information but I'm not sure what I needed to put in the Authorisation field.

Could you clarify what info is needed for the Value field?

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2023

Hi @Natalie Waters 

When you created you API key, you got a string (key)

for the web requests the input for the value field is "Basic <api_key>" (without the quotes)

Natalie Waters December 20, 2023

Ah I see, thank you for clarifying.

Is there a way to ensure users that are being deleted are only those that are not linked to any active tickets? Not sure if an "if" JQL query would support this.

Like Marc - Devoteam likes this
0 votes
David Friedrich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2023

Hi @Natalie Waters , just to make sure: Did you confirm that the API user has the permission to delete all the users that will result from that request?

Another hunch: Are users provisioned through an IDP into your site (= managed users)? You can not delete managed users in your Atlassian site.

Natalie Waters December 13, 2023

Hiya,

Thanks for your input.

The actor in the automation is set to me and as I'm a site admin, technically I should have those permissions.

We're not looking to remove managed users that are being pushed through SCIM. 

Screenshot 2023-12-13 at 09.33.41.png

I've attached a screenshot of the where the users in question are that I'm trying to remove. At this moment, we can only remove users individually but considering the amount of tickets received on a day to day basis, we would like to automate removing using in bulk.

I had previously reached out to the Atlassian support team and was sent the support article so it technically can be done, just not sure why it's not working.

Like David Friedrich likes this
David Friedrich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2023

It is not about the actor of your automation rule. It is about the API key you created and granted basic authentication to. If you can confirm that it is an API key for your user, it should definitely work, if you could go to a user and delete them directly via GUI.

Sometimes it helps to create a new key.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events