Source: https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authorization/grant-role/ Documentation version: v5.3.2 # GRANT ROLE `GRANT ROLE` assigns one or more custom roles to a user in the current service group. A user can have up to 16 custom roles. ## Prerequisites First [connect to the Graph service](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/#connect). Run the command in a GQL client. - To grant roles to a user, you must have `ADMIN` in the current service group. - The user that you want to grant roles to is already created and invited to the current service group. For more information, see [Create users](https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authentication/manage-users/#create_users) and [INVITE USER](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/invite-user/). - The roles have been created with [CREATE ROLE](https://dev-docs.nebula-graph.io/v5.3.2/server-admin/authorization/create-role/). ## Limitations The `ADMIN` role is exclusive to the service group owner and cannot be assigned by using `GRANT ROLE`. ## Syntax Syntax diagramBNF grant_role_command ```` grant_role_command ::= 'GRANT' 'ROLE' role_name (',' role_name)* 'TO' 'USER' user_name ```` ## Parameters ### `role_name` The name of the role to be granted. ### `user_name` The username receiving the roles. ## Examples The example uses the existing role `role1` and user `user1`, who has joined the service group. ```` GRANT ROLE role1 TO USER user1 ```` Check `user1`'s roles with [SHOW ROLES FOR USER](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-roles/). The list should include `role1`. Its privileges combine with the user's existing privileges.