Bulk user import fails with "Error in alt_id property - Expected type string but found type integer"

Problem statement

We are experiencing bulk user import job failure.

[
{
"user": {
"email": "[jane.doe@example.com](mailto:jane.doe@example.com)",
"name": "Jane Doe",
"app_metadata": {
"enabled": true,
"deactivated": false
},
"blocked": false,
"user_id": 10000001234,
"custom_password_hash": {
"algorithm": "bcrypt",
"hash": {
"value": "*****"
}
}
},
"errors": [
{
"code": "INVALID_TYPE",
"message": "Error in alt_id property - Expected type string but found type integer",
"path": "alt_id"
}
]
}
]

We never set this alt_id and job was working fine but suddenly start to break.

Cause

This “Error in alt_id property - Expected type string but found type integer” message is referring to the user_id value for this user in the import. The user_id value is an integer and should be a string.

Solution

Changing it to “user_id”: “10000001234” allowed this user to be imported.