Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Need help for Curl commands to Create User, Group & Permission at AEM Author

Avatar

Level 5

Hi Team

 

Can you please help me for CURL commands following? 

a) Create User and associate with Group (existing or new group)

b) Create User Group along with Permissions 

 

Note :I am referring below URL able to create user and group separately but not able to create group with permissions and Assoicate the user/s to group.


Create new Group.

curl -u admin:admin -FcreateGroup=testgroup -FauthorizableId=testGroup http://localhost:4502/libs/granite/security/post/authorizables

(Not sure FcreateGroup vs FauthorizableId)

 

Referring the below URL:

https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-17456.html?lang=en

 

Regards

Vara

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @varaande ,

To Create New User:

curl -u admin:admin -FcreateUser= -FauthorizableId=test -Frep:password=test http://localhost:4502/libs/granite/security/post/authorizables

To Create new user and assign to specific group:

curl -u admin:admin -FcreateUser=testusr -FauthorizableId=testusr -Frep:password=test1234 -Fmembership=testgroup http://localhost:4502/libs/granite/security/post/authorizables

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @varaande ,

To Create New User:

curl -u admin:admin -FcreateUser= -FauthorizableId=test -Frep:password=test http://localhost:4502/libs/granite/security/post/authorizables

To Create new user and assign to specific group:

curl -u admin:admin -FcreateUser=testusr -FauthorizableId=testusr -Frep:password=test1234 -Fmembership=testgroup http://localhost:4502/libs/granite/security/post/authorizables

 

Avatar

Level 1

Create User and assign group curl command not working 

curl -u admin:admin -FcreateUser=testusr08-FauthorizableId=testusr08 -Frep:password=test1234 -Fmembership=testGroup http://localhost:4502/libs/granite/security/post/authorizables


Error:

Incomplete request, failed to create user/group.

 

 

Avatar

Employee

Hello @varaande  ,

To set permission for the user group .

curl -u admin:admin -FprincipalId=[groupID] -Fprivilege@jcr:read=[true|false] -Fprivilege@jcr:write=[true|false] -Fprivilege@rep:write=[true|false] -Fprivilege@rep:modify=[true|false] http://localhost:4502/etc/rep:policy/[path]

Avatar

Level 1

Hi 

I am not able to run below command what <path> need to give to create. group with permissions.

curl -u admin:admin -FprincipalId=mydemo -Fprivilege@jcr:read=true -Fprivilege@jcr:write=true -Fprivilege@rep:write=true -Fprivilege@rep:modify=true http://localhost:4502/etc/rep:policy/G/GO72D-Olf_wbe2bXFphy

getting error message:
org.apache.sling.api.resource.PersistenceException: Unable to create node at /etc/rep:policy/G