Hi All,
Is it possible to create users in AEM6.1 by using Jackrabbit User Manager API within the OSGi bundle. I have just followed below forum URL but the code is throwing some exception.Please provide your suggestion.
https://helpx.adobe.com/experience-manager/using/jackrabbit-users.html
Thanks,
Sambasivaraja
Solved! Go to Solution.
Views
Replies
Total Likes
Since I have been using deprecated API I was not able to create users in AEM.
Now this problem is resolved .Attached the sample screenshot .
Scott,
We can change the code accordingly to make work in AEM 6.x.Kindly let me know if you need any details.
Thanks,
Sambasivaraja.
Views
Replies
Total Likes
Reason why you are getting the exception is because that article states it is applicable for AEM version 5.6 and 5.5.
You are still going to use the same API. The only difference may be the version.
We will also put this on the list to update this community article to 6.x.
Views
Replies
Total Likes
Hi,
It is possible to create User programmatically using the APIs. As @Scott mentioned it may be difference of having different version of dependency.
What is the error you are seeing ?
Views
Replies
Total Likes
Hi Sambasivaraja
Please share the error message to debug it further.
AS mentioned by Scott, the article (UserManager API) was only tested for AEM 5.5 and 5.6, so it could be the case that in 6.1 dependencies version would have changed.
You can also create user pragmatically using CURL.
Link:- https://hashimkhan.in/2015/05/27/aem-with-curl/
1 | curl -u admin:admin -FcreateUser= -FauthorizableId=hashim -Frep:password=hashim http: //localhost:4502/libs/granite/security/post/authorizables |
1 | curl -u admin:admin -FcreateGroup=group1 -FauthorizableId=testGroup1 http: //localhost:4502/libs/granite/security/post/authorizables |
1 | curl -u admin:admin -Fprofile/age=25 http: //localhost:4502/home/users/h/hashim.rw.html |
1 | curl -u admin:admin -FcreateUser=testuser -FauthorizableId=hashimkhan -Frep:password=hashimkhan -Fprofile/gender=male http: //localhost:4502/libs/granite/security/post/authorizables |
1 | curl -u admin:admin -FcreateUser=testuser -FauthorizableId=testuser -Frep:password=abc123 -Fmembership=contributor http: //localhost:4502/libs/granite/security/post/authorizables |
1 | curl -u admin:admin -FaddMembers=testuser1 http: //localhost:4502/home/groups/t/testGroup.rw.html |
1 | curl -u admin:admin -FremoveMembers=testuser1 http: //localhost:4502/home/groups/t/testGroup.rw.html |
1 | curl -u admin:admin -Fmembership=contributor -Fmembership=testgroup http: //localhost:4502/home/users/t/testuser.rw.html |
1 | curl -u admin:admin -FdeleteAuthorizable= http: //localhost:4502/home/users/t/testuser curl -u admin:admin -FdeleteAuthorizable= http: //localhost:4502/home/groups/t/testGroup |
1 | curl -u testuser:OLD_PWD -F rep:password=NEW_PWD http: //localhost:4502/home/users/t/testuser.rw.html curl rep:password=test user admin:admin http: //localhost:4502/home/users/a/alister@geometrixx.com |
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Since I have been using deprecated API I was not able to create users in AEM.
Now this problem is resolved .Attached the sample screenshot .
Scott,
We can change the code accordingly to make work in AEM 6.x.Kindly let me know if you need any details.
Thanks,
Sambasivaraja.
Views
Replies
Total Likes
We will update this article.
Views
Replies
Total Likes
Views
Likes
Replies