# preregister_users

## nominal.experimental.migration.preregister_users(client, emails)

Preregister users for stack migrations before their first login.

This is intended for migration workflows that need destination-tenant user RIDs ahead of login so migrated
resources can preserve `created_by` attribution.

Parameters:
:   - **client** ([*NominalClient*](https://dev.nominal.io/python/ref/generated/nominal.core.NominalClient.md#nominal.core.NominalClient "nominal.core.client.NominalClient"))

      Destination tenant client. The caller must be an org admin in that tenant.
    - **emails** ([*Sequence*](https://docs.python.org/3/library/typing.html#typing.Sequence "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]*)

      Email addresses to preregister. Accepts at most 1000 emails per request.

Returns:
:   A mapping from email address to newly created user details. Emails that already belong to existing
    accounts are omitted from the response.

Raises:
:   [**NominalError**](https://dev.nominal.io/python/ref/generated/nominal.exceptions.NominalError.md#nominal.exceptions.NominalError "nominal.exceptions.NominalError") – If the preregistration request fails, including when the caller is not an org admin or more
    than 1000 emails are given.

Return type:
:   [*Mapping*](https://docs.python.org/3/library/typing.html#typing.Mapping "(in Python v3.15)")[[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"), [*User*](https://dev.nominal.io/python/ref/generated/nominal.core.User.md#nominal.core.User "nominal.core.user.User")]
