---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/25003#article
headline: "25003: The provided user's last name is invalid"
url: https://www.twilio.com/docs/api/errors/25003
inLanguage: en
dateModified: 2026-06-08T11:29:20.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 25003: The provided user's last name is invalid

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when you create or update an organization-managed user through the SCIM API and the value in `name.familyName` is not accepted. Twilio creates users with the SCIM core user schema, and `name.familyName` is a supported field for both `PUT` and `PATCH` updates.

### Possible causes

* Your `POST /scim/v2/Users` request includes an invalid value in `name.familyName`.
* Your `PUT /scim/v2/Users/{id}` request replaces the user record and includes an invalid value for `name.familyName`.
* Your `PATCH /scim/v2/Users/{id}` request uses `path: "name.familyName"` and supplies an invalid replacement value.

### Possible solutions

* Validate the value you send in `name.familyName` before submitting the request. If you are creating a user, format the request body as a valid SCIM core user object.
* If you are updating an existing user, change the last name only through the supported SCIM field `name.familyName` in a `PUT` or `PATCH` request.
* If you do not need to set a last name during user creation, omit the optional `name` object and send the required fields only, which are `userName` and `emails`.

#### Additional resources

* [SCIM API overview](/docs/iam/scim)
* [SCIM API reference](/docs/iam/scim/api-reference)
* [Organizations](/docs/iam/organizations)
