Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bulk users disable via csv

DE GIORGI STEFANO
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2024

Hi,

I should disable 100 provisioned users. I would like to postaman via csv.

Taking a cue from this article https://developer.atlassian.com/cloud/admin/user-provisioning/rest/api-group-users/#api-scim-directory-directoryid-users-userid-delete

I should do this:

 

PATCH

https://api.atlassian.com/scim/directory/{directoryId}/Users/{{userId}}

with body:

 

{
   "schemas":[
      "urn:ietf:params:scim:api:messages:2.0:PatchOp"
   ],
   "Operations":[
      {
         "op":"replace",
         "path":"members",
         "value":[
           
            {
            "userId":"{{userId}}",
            "active": false
            }
         ]
      }
   ]
}
do you think this is correct?
Thank you for your help

1 answer

0 votes
Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 6, 2024

Hi @DE GIORGI STEFANO 

Whether this is the best way to do this depends on your exact set up and what you are trying to achieve.

Assuming it is best to use the API - I think the path attribute can be removed from the JSON, as it is only required when updating a specific attribute or sub attribute.

The userId should also not be in the JSON - otherwise you are essentially telling the directory to update the userId attribute to its current value(we only want to update the active attribute). The userId should be specified as you have indicated via the path parameter.

Would be interested to understand your use case behind why exactly you need to do this.

Suggest an answer

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

Atlassian Community Events