# Why user\_id property is not allowed when creating a new user?

**URL:** <https://community.auth0.com/t/why-user-id-property-is-not-allowed-when-creating-a-new-user/103559>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [March 28, 2023, 6:12pm UTC](https://community.auth0.com/t/why-user-id-property-is-not-allowed-when-creating-a-new-user/103559 "2023-03-28T18:12:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene.shemonaev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eugene.shemonaev/32/45851_2.png) [@eugene.shemonaev](https://community.auth0.com/u/eugene.shemonaev)\
**Post date:** [March 28, 2023, 6:12pm UTC](https://community.auth0.com/t/why-user-id-property-is-not-allowed-when-creating-a-new-user/103559/1 "2023-03-28T18:12:04Z")

</div>

I deleted a connection and with it also all user related to it also were deleted. I try to restore users by creating them via Postman with same ids

```auto
{
    "user_id": "sms|627fa64b9cd59005b0225c40",
    "given_name": "Анна",
    "family_name": "Ромушко",
    "phone_number": "+380638916323",
    "app_metadata": {
        "documentsUploaded": true,
        "documentsChecked": true,
        "ownerId": "google-oauth2|102304051984257672435",
        "accessibleBrands": [
            "E052Pr5zGiDxeemi1eMoP",
            "KaaruemwT8hVcVvD8n7be",
            "5nJpqUuCB6OLValrMB3mc4",
            "1uKBA11cjoiv5mNjrUM4JE"
        ]
    },
    "user_metadata": {
        "middleName": "Алексеевна",
        "preferredDeliverySettlementId": "e717110a-4b33-11e4-ab6d-005056801329"
    },
    "connection": "sms"
}

```

but I always get this response:

```auto
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "\"user_id\" is not allowed",
    "errorCode": "invalid_body"
}

```

Documentation says that user\_id is optional property in body when creating a new user.

It is very important to create user with specific user\_id. What I am doing wrong?

P.S. I also tried to create user with random user\_id but it also returns same response

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 29, 2023, 3:12pm UTC](https://community.auth0.com/t/why-user-id-property-is-not-allowed-when-creating-a-new-user/103559/3 "2023-03-29T15:12:17Z")

</div>

Hi @eugene.shemonaev,

Thanks for reaching out to the Auth0 Community!

After looking closely at your request, I noticed you are creating a Passwordless SMS User with the `user_id` property.

Unfortunately, this is not allowed and will produce the `"user_id" is not allowed` error.

Generally, the `user_id` can be optionally passed when creating database connection users.

I hope this helps!

Please feel free to reach out if you have any additional questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 12, 2023, 3:12pm UTC](https://community.auth0.com/t/why-user-id-property-is-not-allowed-when-creating-a-new-user/103559/4 "2023-04-12T15:12:49Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
