LinusL
ZITADEL•6mo ago•
10 replies
Linus

External OAuth2 provider Error:SetHumanProfile.GivenName: value length must be between 1 and 200 run

I use an external OAuth2 provider as an alternative to the default zitadel login. Currently im facing the following error after succesfull OAuth login flow:

"[invalid_argument] invalid AddHumanUserRequest.Profile: embedded message failed validation | caused by: invalid SetHumanProfile.GivenName: value length must be between 1 and 200 runes, inclusive"

Zitadel is requesting the OAuth2 user endpoint and getting the following example response:

{
   "sub": "8d4925e3-8f41-4e4d-9654-6c5f183fda06",
   "id": 200,
   "uuid": "8d4925e3-8f41-4e4d-9654-6c5f183fda06",
   "username": "j.doe",
   "name:": "John Doe",
   "salutation": "mr",
   "firstname": "John",
   "lastname": "Doe",
   "family_name": "Doe",
   "email": "john_doe@example.com",
   "given_name": "John",
   "givenName": "John" // tested with all several combinations "GivenName", "profile.givenName", "profile.given_name"..
}


Zitadel Settings:
- ID Attribute: "sub" (uuid is working as well)
- Scopes: "user:read"

Questions:
- Is there any example response in the docs where the correct userendpoint json structure is listed for the external OAuth2 IDP?
- Can anyone help how the "given_name" must me formatted?

Thank u so much
image.png
Was this page helpful?