Need help for Curl commands to Create User, Group & Permission at AEM Author | Community
Skip to main content
New Participant
July 27, 2023
Solved

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

  • July 27, 2023
  • 2 replies
  • 1468 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kaikubad

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

 

2 replies

Ekhlaque
Employee
July 27, 2023

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]
New Participant
July 28, 2023

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

 

 

 

 

 

 

kaikubad
kaikubadAccepted solution
New Participant
July 27, 2023

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

 

New Participant
July 28, 2023

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.