Organization metadata sometimes changed when reading it back
I think this might be a bug in release 2.71.1. I write a value of "5566778899" to an organization metadata field. When I read it back I receive the value "556677889w==". I've observed values roundtrip correctly (shorter values, longer values), but something about this value triggers an edge case.
If it matters: I'm accessing the REST API from ruby, Zitadel is running locally in Docker Compose.
Sample API interaction attached. Hope this is easy to figure out with a test-case.
4 Replies
Here it is as readable text
hi @rud is the value you are setting
5566778899
is base64 encoded?
when I encoded it, it was coming as NTU2Njc3ODg5OQ==
not sure if I missed anything when I see your request, I see a plan text value that you are sending(I guess?)
Try sending value as NTU2Njc3ODg5OQ==
and see if it chnages anything?
Here are the doc for setting org metadataZITADEL Docs
This endpoint either adds or updates a metadata value for the requested key. Make sure the value is base64 encoded.

Oooh, I'd completely missed the "The value has to be base64 encoded." I can totally see how that makes sense for allowing arbitrary values to be up/downloaded in a JSON API. Thank you for the help @Rajat Singh !
Hi @rud glad I could help 🙂 to close this issue, you can mark my response with ✅ to mark it as solved 🙂