# updateOwnProfile

## Overview

Updates the current user's own profile (name and/or email). If the email changes, the IdP username is synchronized.

## Modules Commands Used

- [user-management] UpdateOwnProfile

## Exception Handling

| Error Code | Description |
| --- | --- |
| USER_MANAGEMENT_USER_NOT_FOUND | The current user was not found |
| USER_MANAGEMENT_INVALID_STATUS_TRANSITION | Only active users can update their own profile |
| 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 |
