SCIM client group search#900
Merged
simpleidserver merged 3 commits intosimpleidserver:release/v6.0.3from Jul 1, 2025
Merged
Conversation
7b893bd
into
simpleidserver:release/v6.0.3
0 of 3 checks passed
Owner
|
Hello 😊 Thank you very much for your contribution — the pull request has been accepted! Kind regards, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes it possible to search for groups with the SCIMClient class from the project SimpleIdServer.Scim.Client.
It also adds the Filter parameter in SearchRequest objects to enable use of filters from the SCIM specification.
Why do I need this?
I have a setup like this:
(My company's application) <--- SimpleIdServer <--- Azure
Users are created/modified on Azure which sends SCIM requests to SimpleIdServer. SimpleIdServer handles SCIM requests and raises events that are handled by an
IntegrationEventConsumer : IConsumerinstance that calls the user management API in my company's application.My company's application has a Users table in its database, and each user has an attribute "AD name". Users also exist in SimpleIdServer as you know. My IntegrationEventConsumer assumes that a user in my company's application with AD name "AzureAD\john.doe" corresponds to the user in SimpleIdServer that has username "AzureAD\john.doe". So myAppUser.ADName = SidUser.username is how the two user databases are "connected".
When a group is added to SimpleIdServer, the method
Consume(ConsumeContext<RepresentationAddedEvent> context)is called in myIntegrationEventConsumerclass. The group data sent to thisConsume-method has anIEnumerable<ScimGroupMember>property. An instance ofScimGroupMemberonly specifies the ID of the user in the SimpleIdServer database, no other attributes (particularly username) are included. I need to know the username of the users in the group, which I use the SCIMClient class for. Once I have obtained the full user objects for the users that are part of the added group, I need to do one more thing. For each user in the group, I want to know of all groups that it belongs to. This is where I noticed that the SCIMClient class was missing the SearchGroups method. Without it I could not get the displayName of all groups that a user is member of.