From 322a97517211f41bc5008cf9ee16ac8c0570cc3b Mon Sep 17 00:00:00 2001 From: armorbreak001 Date: Wed, 22 Apr 2026 21:31:46 +0800 Subject: [PATCH] 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 --- src/auth0/management/types/user_identity_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth0/management/types/user_identity_schema.py b/src/auth0/management/types/user_identity_schema.py index 3b899a8d..662e53c2 100644 --- a/src/auth0/management/types/user_identity_schema.py +++ b/src/auth0/management/types/user_identity_schema.py @@ -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. """