# updateUserProfile

## Overview

Updates a user's profile (name and/or email) by an administrator. If the email changes, the IdP username is synchronized.

## Modules Commands Used

- [user-management] UpdateUser

## Exception Handling

| Error Code | Description |
| --- | --- |
| USER_MANAGEMENT_USER_NOT_FOUND | The specified user does not exist |
| USER_MANAGEMENT_USER_ALREADY_EXISTS | A user with the new email already exists |
| USER_MANAGEMENT_MISSING_REQUIRED_FIELD | At least one of name or email must be provided |
| USER_MANAGEMENT_INVALID_NAME | Name must not be empty |
| USER_MANAGEMENT_INVALID_EMAIL | The email address format is invalid |
| INSUFFICIENT_PERMISSION | The caller does not have permission to perform this operation |
