how to delete bulk users with curl command | Community
Skip to main content
New Participant
Apr 3, 2017 3:05 PM UTC
Solved

how to delete bulk users with curl command

Hi Team,

I have a bulk users list which need to delete from Author instance (CQ 5.6.1) with curl command. 

Could you please guide/suggest?

Br
Chandrakant Gurhale

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vjetty
vjettyAccepted solution
Level 4
Apr 3, 2017 4:14 PM UTC

Hi, Chandrakant

You can use the following parameter in your curl command for multiple items ":applyTo" - 

-F":applyTo=/content/page1" -F":applyTo=/content/page2"

For more info on this please refer - https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html

I hope all 10 author instances are in sync when it comes to users and how they've been created. Please check that before you proceed. 

Thanks! 

6 replies

viperortonrandy
New Participant
Jun 28, 2018 9:43 AM UTC

Hi I tried the tool but I am getting an error,

28.06.2018 15:11:43.708 *ERROR* [0:0:0:0:0:0:0:1 [1530178903706] GET /bin/tools/listSelectedGroupsUsers HTTP/1.1] com.handsonaem.vamsijetty.useradminutility.core.servlets.ListSelectedGroupsUsers java.lang.NullPointerException

Translate
vjetty
Level 4
Apr 4, 2017 9:40 PM UTC

Did it worked for you? 

Translate
vjetty
Level 4
Apr 3, 2017 4:37 PM UTC

And, if you don't have details listed foe user, here is the utility I created little while ago and it will help you to get users details quickly into report along with groups. Please try in your local first. It is compiled against AEM 6.1 SP2. 

https://github.com/vamsijetty/useradmin-utility.git

Hope it helps! Thanks! 

Translate
vjetty
vjettyAccepted solution
Level 4
Apr 3, 2017 4:14 PM UTC

Hi, Chandrakant

You can use the following parameter in your curl command for multiple items ":applyTo" - 

-F":applyTo=/content/page1" -F":applyTo=/content/page2"

For more info on this please refer - https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html

I hope all 10 author instances are in sync when it comes to users and how they've been created. Please check that before you proceed. 

Thanks! 

Translate
CKG2Author
New Participant
Apr 3, 2017 3:51 PM UTC

Hi Vamsi, 
Thanks for your reply.  Please find my below comments

1] Yes this is on Author.
2] More than 70 users.
3] User login ID.
4] Yes, these all are Authoring users.

We need to run this removal task (with Curl) on 10 individual Author instances and all Author instances had different user login id's which are unwanted.

Appreciate your suggestions in Advance.

Br
Chandrakant Gurhale

Translate
vjetty
Level 4
Apr 3, 2017 3:40 PM UTC

Hi, Chandrakanth

Please put up more details around the requirement. You want to delete the users from author? How many users you are expecting to delete and what details you have in your bulk users list. Did you sort out what users need to be deleted from AEM? To delete users in bulk you need to be careful enough. 

Thanks,

Vamsi

Translate