cancel
Showing results for 
Search instead for 
Did you mean: 

Rest Api create user and assign it to a group

houssam97
Champ on-the-rise
Champ on-the-rise

Hi everyone ,

Is it possible to create an user and assign it to a group in alfresco 5.2?

thanks Smiley Happy 

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

You can use below rest api for creating user and allocate an already available group to the user (Note that these APIs will work only for admin roles):

 
userName
mandatory - the user name for the new user
firstName
mandatory - the given Name
lastName
mandatory - the family name
email
mandatory - the email address
password
optional - the new user's password. If not specified then a value of "password" is used which should be changed as soon as possible.
disableAccount
optional - If present and set to "true" the user is created but their account will be disabled.
quota
optional - Sets the quota size for the new user, in bytes.
groups
optional - Array of group names to assign the new user to.
title
optional - the title for the new user.
organisation
optional - the organisation the new user belongs to.
jobtitle
optional - the job title of the new user.
The web script description document specifies the following options:
Value Description
json The default response format
admin The authentication access
required The transaction level
argument The format style
 
Additionally, you can add user to a group using below given rest api:
 
~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

You can use below rest api for creating user and allocate an already available group to the user (Note that these APIs will work only for admin roles):

 
userName
mandatory - the user name for the new user
firstName
mandatory - the given Name
lastName
mandatory - the family name
email
mandatory - the email address
password
optional - the new user's password. If not specified then a value of "password" is used which should be changed as soon as possible.
disableAccount
optional - If present and set to "true" the user is created but their account will be disabled.
quota
optional - Sets the quota size for the new user, in bytes.
groups
optional - Array of group names to assign the new user to.
title
optional - the title for the new user.
organisation
optional - the organisation the new user belongs to.
jobtitle
optional - the job title of the new user.
The web script description document specifies the following options:
Value Description
json The default response format
admin The authentication access
required The transaction level
argument The format style
 
Additionally, you can add user to a group using below given rest api:
 
~Abhinav
(ACSCE, AWS SAA, Azure Admin)