Skip to content

SCIM client group search#900

Merged
simpleidserver merged 3 commits intosimpleidserver:release/v6.0.3from
canea-asb:scim_client_group_search
Jul 1, 2025
Merged

SCIM client group search#900
simpleidserver merged 3 commits intosimpleidserver:release/v6.0.3from
canea-asb:scim_client_group_search

Conversation

@canea-asb
Copy link
Copy Markdown
Contributor

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 : IConsumer instance 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 my IntegrationEventConsumer class. The group data sent to this Consume-method has an IEnumerable<ScimGroupMember> property. An instance of ScimGroupMember only 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.

@simpleidserver simpleidserver changed the base branch from master to release/v6.0.3 July 1, 2025 13:50
@simpleidserver simpleidserver merged commit 7b893bd into simpleidserver:release/v6.0.3 Jul 1, 2025
0 of 3 checks passed
@simpleidserver
Copy link
Copy Markdown
Owner

Hello 😊

Thank you very much for your contribution — the pull request has been accepted!

Kind regards,
SID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants