D0gma_
D0gma_β€’4w ago

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 πŸ˜‰
14 Replies
D0gma_
D0gma_OPβ€’4w ago
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 ? πŸ˜”
Rajat
Rajatβ€’3w ago
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 πŸ˜„
D0gma_
D0gma_OPβ€’3w ago
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 πŸ˜…)
Rajat
Rajatβ€’3w ago
you can check the comments, marco is working on it, he's still implementing another endpoint should not be too long πŸ™‚
D0gma_
D0gma_OPβ€’3w ago
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
curl --location 'https://sso.mydomain.fr/v2/users/new' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer thIsIsMyToken' \
--data-raw '{
"organizationId": "333665636326637571",
"username": "minnie-mouse",
"human": {
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com"
}
}
}'
curl --location 'https://sso.mydomain.fr/v2/users/new' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer thIsIsMyToken' \
--data-raw '{
"organizationId": "333665636326637571",
"username": "minnie-mouse",
"human": {
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com"
}
}
}'
{
"code": 12,
"message": "Method Not Allowed"
}
{
"code": 12,
"message": "Method Not Allowed"
}
The deprecated /human endpoint works tho πŸ‘€
Rajat
Rajatβ€’2w ago
hey @D0gma_ yes the deprecated /human because we are still transitioning from v1->v2 apis, you will know when it will stop working, more about this on our roadmap
D0gma_
D0gma_OPβ€’2w ago
Ok so that is normal that the /new endpoint is non-fonctional ?
Rajat
Rajatβ€’2w ago
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) πŸ™‚
D0gma_
D0gma_OPβ€’2w ago
Ok that’s clear, thank you πŸ™ƒ
D0gma_
D0gma_OPβ€’3d ago
Thank you ! What I am not sure reading the doc, is will the metadata be returned in the response ?
Rajat
Rajatβ€’3d ago
the response should like this but I guess its still broken
Rajat
Rajatβ€’3d ago
No description
Rajat
Rajatβ€’3d ago
so it looks like an issue on our end

Did you find this page helpful?