# updateRole

## Overview

Updates a role's name, description, and permissions. Auto-assigned permissions (user-management:profile) are always preserved.

## Modules Commands Used

- [user-management] UpdateRole

## Exception Handling

| Error Code | Description |
| --- | --- |
| USER_MANAGEMENT_ROLE_NOT_FOUND | The specified role does not exist |
| USER_MANAGEMENT_ROLE_ALREADY_EXISTS | A role with the new name already exists |
| USER_MANAGEMENT_ROLE_NOT_ACTIVE | The role is not in active status |
| USER_MANAGEMENT_MISSING_REQUIRED_FIELD | Role name cannot be empty |
| INSUFFICIENT_PERMISSION | The caller does not have permission to perform this operation |
