User metadata does not appear in the token
Good day. I am currently using the self-hosted Zitadel, and I have a problem with the metadata in the id_token. I'm relying on the information in the documentation(https://zitadel.com/docs/guides/manage/customize/user-metadata). In order for the metadata to appear in the user's id_token, I need to set in the application settings "User info inside ID token", and I did it in my React app (pic. 1). I have set the specific user's metadata using the API via Python requests, and looks like it was successfully Inserted and then retrieved (pic. 2). But on decrypting the token_id after the next login by this user via my React app, the metadata does not appear in its payload, however, information from other settings is present. (pic. 3).



11 Replies
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
yess, that scope is missing, here's more on that @notfoundium
https://zitadel.com/docs/apis/openidoauth/scopes#:~:text=By%20adding%20this%20scope%2C%20the%20metadata%20of%20the%20user%20will%20be%20included%20in%20the%20token.%20The%20values%20are%20base64%20encoded.
Thanks for the reply. I've added it to scope, but nothing seems to have changed (
This is actual request payload:

hi @notfoundium did the error changed somehow?
Hmm, I cannot say that there is an error. Just the metadata field still did not appear after the changes were made 🤔
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Yes, I did. I also noticed that the set metadata is returned in the response to the API request, but is not displayed in the console:


Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
In addition to my previous reply, I also checked this user via the console as superuser, and in this case the metadata is displayed:

Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Looks like the problem is solved. I had to explicitly enable this setting:
