Skip to content

fix: support SCIM 2.0 count=0 parameter per RFC 7644#168

Merged
pond merged 1 commit into
pond:mainfrom
lorman:handle-count-0
Feb 15, 2026
Merged

fix: support SCIM 2.0 count=0 parameter per RFC 7644#168
pond merged 1 commit into
pond:mainfrom
lorman:handle-count-0

Conversation

@lorman
Copy link
Copy Markdown
Contributor

@lorman lorman commented Feb 12, 2026

Implement support for count=0 query parameter as specified in RFC 7644 Section 3.4.2.4, which requires returning only metadata (totalResults) without resource data.

Changes:

  • Allow count=0 in Scimitar::Lists::Count (previously raised error)
  • Skip database query for records when count=0 (performance optimization)
  • Return empty Resources array with correct totalResults and itemsPerPage=0
  • Add comprehensive test coverage for count=0 behavior

This fixes issues with SCIM clients (Azure AD, Okta, Google Workspace) that use count=0 to retrieve only total counts without fetching records.

Implement support for count=0 query parameter as specified in RFC 7644
Section 3.4.2.4, which requires returning only metadata (totalResults)
without resource data.

Changes:
- Allow count=0 in Scimitar::Lists::Count (previously raised error)
- Skip database query for records when count=0 (performance optimization)
- Return empty Resources array with correct totalResults and itemsPerPage=0
- Add comprehensive test coverage for count=0 behavior

This fixes issues with SCIM clients (Azure AD, Okta, Google Workspace)
that use count=0 to retrieve only total counts without fetching records.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@pond
Copy link
Copy Markdown
Owner

pond commented Feb 15, 2026

Looks good! Many thanks. I hope to do a release soon, ish; busy period, not much spare time. You can of course set your Gemfile to pull from GitHub on main if you don't want to wait.

@pond pond merged commit a36e521 into pond:main Feb 15, 2026
6 checks passed
@pond
Copy link
Copy Markdown
Owner

pond commented Mar 5, 2026

This is now available in v2.15.0. Thanks again!

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