List users with metadata
Hi, is there a way in the API V2 to list all users with their metadata ?
The use case is the following : I need to sync my zitadel users periodically with an application, because I can't wait for them to login on this specific app to have an account on it.
I can perfectly list all the users with the
POST /users endpoint, but I need a very crucial piece of information (the room number of the user for an internet connection providing service), that is in the metadata, and those are not returned in the endpoint (we formerly used keycloak, where the "attributes" were included in the /users endpoints).
Am I forced to make one api call by user after listing them to get that info ?
Thank you π27 Replies
Side question : where can I find an up-to-date v2 api documentation for zitadel 4.0.2 (or even v3.3.3 for that matter) ? The currently displayed user creation endpoint
.../new returns a "Method Not Allowed" when posted ? Am I missing something ? πhey @D0gma_ thanks for your question, there's a PR in works for the same https://github.com/zitadel/zitadel/pull/10415
hope this helps π
Side question : where can I find an up-to-date v2 api documentation for zitadel 4.0.2 (or even v3.3.3 for that matter)all the APIs listed under V2 works on all zitadel console as long as they're at least V4, you may have to still get around with v1 apis if you are using zitadel cloud as its on
v3.3.x I believe.
This is the V4 Roadmap for Zitadel it also lists the V2 APIs that you can already use
I have said it before π we are in the middle of transtioning v1->v2 apis hence you might see some apis not being working correctly, but pls lmk if that happens, im here to help πSounds great thanks ! If everything goes as plan, when can the release be expected ? (Not to rush you in any way, just to have a rough idea π
)
you can check the comments, marco is working on it, he's still implementing another endpoint
should not be too long π
Ok so thatβs strange, Iβll test again tonight (CET) the /new endpoint, and will follow up with a detailed message if I have the same problem
Hello @Rajat , quick follow-up, I think I have an issue on Zitadel v4.0.3, following the current documentation for a POST
The deprecated
/human endpoint works tho πOk so that is normal that the /new endpoint is non-fonctional ?
hey @D0gma_ no, its not normal, I just got back from my vacation today, I will check up with my team and also test it for myself to see why its not working(you are not doing anything wrong based on past conversations) π
Ok thatβs clear, thank you π
Thank you ! What I am not sure reading the doc, is will the metadata be returned in the response ?

so it looks like an issue on our end
hey @D0gma_ can u pls share a screenshot π
I get a http 500 error (Zitadel v4.1.3):
But beside that, what I meant was "I thought the scope of this feature was also to provide the user metadata in the response of the query, did I misunderstood that ?"
cc @Federico
this feature has not been released yet, you can review that here:
- https://github.com/zitadel/zitadel/releases
- https://github.com/zitadel/zitadel/pull/10415
@Rajat Ok nice so in 4.2.0 that works π₯ , but that doesn't quite solve my initial usecase, because the metadata (queried or not), are not returned in the response. I cannot determine the metadata value of several users whithout doing a call for each, I can only know which user have this metadata key
hey @D0gma_
I cannot determine the metadata value of several users whithout doing a call for each, I can only know which user have this metadata keypls share your curl call and what did you expect to happen?. Thanks
Hi, what i mean is when i filter my user search by metadata key, I would suppose I have access to the corresponding metadata value for each user directly.
For instance, with this :
I'd expect to have a response like this :
because just knowing which users have the school metadata is pretty useless for me (they pretty much all do), what I am interested in is getting a batch of the metadata value associated to the school key for several users at a time.
ahh okay, so is it like, you want to get all the metadata set for a user based on if one key is matched?. I think that wont be possible, but that would be due to security considerations, please lmk if I am getting it correctly?.
Well almost that π not all the metadata set, but the value associated to the matched key, for every user matched at once
ahh then you need to change
TEXT_FILTER_METHOD_EQUALSHow so ?
