Query users from a specific organization

112 views
Skip to first unread message

Peter Dormehl

unread,
Jul 8, 2024, 2:40:46 AM7/8/24
to Keycloak User
Hi all, 

I am trying to work out from the REST API how to query users who belong to a specific organization. I do know this is a new feature, but I assume there is a way to run this query but cannot find it. 

Thomas Darimont

unread,
Jul 8, 2024, 2:53:46 AM7/8/24
to Keycloak User
Hello Peter,

how do you want to query the user? By userId, username or email?

Try: /realms/myrealm/organizations/{orgId}/members/{userId}



Kind regards,
Thomas

Peter Dormehl

unread,
Jul 8, 2024, 7:35:49 AM7/8/24
to Thomas Darimont, Keycloak User

Hello Thomas,

 

Thank you for this assistance, this is what I was trying to locate. I will work through it.

 

Thanks

 

Peter Dormehl

CTO
Erisco Inc | www.erisco.net +1 775 397 7335


 

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. The integrity and security of this email cannot be guaranteed over the Internet. Therefore, the sender will not be held liable for any damage caused by the message.

 

From: 'Thomas Darimont' via Keycloak User <keyclo...@googlegroups.com>
Sent: Monday, July 8, 2024 12:54 AM
To: Keycloak User <keyclo...@googlegroups.com>
Subject: [keycloak-user] Re: Query users from a specific organization

 

--
You received this message because you are subscribed to a topic in the Google Groups "Keycloak User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keycloak-user/4MvYXuu70B8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/ee2c5a0f-ace4-42a4-94f7-3105001c3d71n%40googlegroups.com.

Peter Dormehl

unread,
Jul 15, 2024, 4:33:42 PM7/15/24
to Keycloak User
Hi all,

Another question will there be a count return for the members of an organization. I don't see one in the API? Is this coming in a later release. 

Stefan Guilhen

unread,
Jul 17, 2024, 2:07:49 PM7/17/24
to Peter Dormehl, Keycloak User
Hi Peter,

This is currently not possible, as you've pointed out. I've opened https://github.com/keycloak/keycloak/issues/31388 to track this enhancement and we will try to get it done for Keycloak 26.

Cheers!

You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/6f31d951-cd19-43d0-82d8-076de98aa0bfn%40googlegroups.com.


--

Stefan Guilhen

He/Him
Principal Software Engineer

Red Hat

sgui...@redhat.com    IM: sguilhen

Peter Dormehl

unread,
Jul 17, 2024, 2:09:08 PM7/17/24
to Stefan Guilhen, Keycloak User

Hi Stefan,

 

Thanks for the update. I will follow this issue!


Thanks

 

Peter Dormehl

CTO
Erisco Inc | www.erisco.net +1 775 397 7335


 

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. The integrity and security of this email cannot be guaranteed over the Internet. Therefore, the sender will not be held liable for any damage caused by the message.

 

From: Stefan Guilhen <sgui...@redhat.com>
Sent: Wednesday, July 17, 2024 1:07 PM
To: Peter Dormehl <pdor...@erisco.net>
Cc: Keycloak User <keyclo...@googlegroups.com>
Subject: Re: [keycloak-user] Re: Query users from a specific organization

 

You don't often get email from sgui...@redhat.com. Learn why this is important

Reply all
Reply to author
Forward
0 new messages