Fix SCIM disable all non SCIM managed members

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-02-03 16:01:03 +01:00
parent e6a97f6b29
commit 1bc5ebce2c
2 changed files with 31 additions and 6 deletions

View File

@@ -294,6 +294,13 @@ func (s *Service) ListUsers(
return nil, 0, err
}
// Only return SCIM-managed users. This ensures that:
// 1. Users created through other means (manual, SAML) are not deactivated
// when they don't exist in the identity provider.
// 2. When a manual user exists in the identity provider but not in the
// SCIM list, CreateUser is called which enrolls them into SCIM management.
filter.WithSource(coredata.MembershipSourceSCIM)
scope := coredata.NewScopeFromObjectID(config.OrganizationID)
var memberships coredata.Memberships