0

I have an excel sheet having all the details like user id, emailid ,password ,firstname and lastname. How can import this excel so that it imports are all the users under path /home/users/test.

2
  • Can you please share some code for your issue ? Are you writing a AEM component to import your users ? Apr 5, 2015 at 11:34
  • I don't need any component level code . Even a script will do. All I need a script that should import users from excel sheet containing user's details into CQ/AEM
    – subramanya
    Apr 21, 2015 at 10:43

2 Answers 2

2

Either use Apache POI to write some custom code that reads in the rows of the sheet, and then uses the [JackRabbit UserManager][2] library to create the users.

Alternatively, simply save the Excel as a CSV and write a (bash or bat) script that iterates over the CSV file and calls a POST command to create the user:

curl -u admin:admin -FcreateUser= -FauthorizableId=$UserNameReadFromCSV -Frep:password=$PasswordReadFromCSV http://localhost:4502/libs/granite/security/post/authorizables
1
  • Thanks for these valuable inputs TIM. Do you have a sample CSV file containing a few sample users so that I can try this at my end. I have never done this before. This requirement is from my client.
    – subramanya
    Apr 21, 2015 at 10:39
0

May be I am late to the party but I have been working on this requirement and created a utility in the AEM for the same.

This utility allows the users to upload an excel file with the user details and creates users in the AEM to the desired group automatically.

https://aem.redquark.org/2019/05/create-users-in-aem-from-excel-file.html

You can see the code for the same at my GitHub. https://github.com/ani03sha/BulkUserCreation

I hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.