Liferay · Capability
Liferay Roles API
Roles API Basics. You can create and manage roles from the Application menu, but you can also use Liferay's REST APIs. Call these services to manage roles, including associating and dissociating users to regular, site, and organization roles.
What You Can Do
GET
Getroles
— List roles
/roles
GET
Getrole
— Get a role
/roles/{roleId}
POST
Associateroletouser
— Associate a regular role to a user
/roles/{roleId}/association/user-account/{userId}
DELETE
Dissociaterolefromuser
— Remove regular role association from a user
/roles/{roleId}/association/user-account/{userId}
POST
Associatesiteroletouser
— Associate a site role to a user
/roles/{roleId}/association/user-account/{userId}/site/{siteId}
DELETE
Dissociatesiterolefromuser
— Remove site role association from a user
/roles/{roleId}/association/user-account/{userId}/site/{siteId}
POST
Associateorgroletouser
— Associate an organization role to a user
/roles/{roleId}/association/user-account/{userId}/organization/{orgId}
DELETE
Dissociateorgrolefromuser
— Remove organization role association from a user
/roles/{roleId}/association/user-account/{userId}/organization/{orgId}
MCP Tools
getroles
List roles
read-only
idempotent
getrole
Get a role
read-only
idempotent
associateroletouser
Associate a regular role to a user
dissociaterolefromuser
Remove regular role association from a user
idempotent
associatesiteroletouser
Associate a site role to a user
dissociatesiterolefromuser
Remove site role association from a user
idempotent
associateorgroletouser
Associate an organization role to a user
dissociateorgrolefromuser
Remove organization role association from a user
idempotent