Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(types): allow user_id to accept int values in UserIdentitySchema
GitHub identity providers (and possibly others) return user_id as an
integer rather than a string. The current Optional[str] typing causes
Pydantic validation errors when calling users.get() for such accounts.

Relax the type to Union[str, int] to match the actual API behavior.

Fixes #826
  • Loading branch information
armorbreak001 committed Apr 22, 2026
commit 322a97517211f41bc5008cf9ee16ac8c0570cc3b
2 changes: 1 addition & 1 deletion src/auth0/management/types/user_identity_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class UserIdentitySchema(UniversalBaseModel):
Name of the connection containing this identity.
"""

user_id: typing.Optional[str] = pydantic.Field(default=None)
user_id: typing.Optional[typing.Union[str, int]] = pydantic.Field(default=None)
"""
Unique identifier of the user user for this identity.
"""
Expand Down