Scim Schema

Published
Length
3 min read

Luis Felipe Dias

All posts

A scim schema defines the standard JSON format for syncing user accounts and groups across apps. Teams map identity provider fields to this standard so apps create, update, and delete users on their own. Most teams start by syncing basic user profiles and broad group names from their directory. When those groups map to wide roles, new users get far too much power on day one. How a scim schema works in your stack SCIM stands for System for Cross-domain Identity Management. It gives your identi

API Schema Validation: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

A scim schema defines the standard JSON format for syncing user accounts and groups across apps. Teams map identity provider fields to this standard so apps create, update, and delete users on their own. Most teams start by syncing basic user profiles and broad group names from their directory. When those groups map to wide roles, new users get far too much power on day one.

How a scim schema works in your stack

SCIM stands for System for Cross-domain Identity Management. It gives your identity provider and your downstream apps a shared language. Without a shared format, every app needs custom code to read user records. The standard fixes this problem by sorting attributes into clear resource types.

The two main resource types are Users and Groups. The core user structure holds basic facts like usernames, display names, emails, and active status. Many firms also add the enterprise user extension to track extra work details. This extension adds fields for cost centers, employee numbers, divisions, and manager names.

Each attribute in the schema has strict rules for how it behaves. Mutability rules decide if an app can read, write, or never change a value. Returned rules control when the app sends a value back in a response. Uniqueness rules make sure two users do not share the same login name or ID.

How teams map attributes and sync roles

To set up user sync, an admin pairs directory fields with target attributes. The identity provider watches for changes to user profiles or group memberships. When a person joins a team, the provider sends a web request to the target app. The app reads the payload, checks the schema rules, and creates the new account.

When someone leaves the company, the provider sends an update that flips the active flag to false. This step blocks the user from logging in through that app right away. Groups work the same way by syncing lists of member IDs to the target system. Target apps often map these synced group names straight to internal roles.

Teams should test attribute mappings in a staging setup before turning on full sync. Bad mappings can overwrite user profiles or put engineers into the wrong groups. Admins must also check how each target app handles soft deletes versus hard deletes. Clear mapping rules keep directory data clean across every connected tool.

API Schema Validation: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What identity sync solves and what it misses

A clean sync setup saves hours of manual account work for IT and security teams. It stops orphaned accounts from sitting open after an employee leaves the company. It also makes sure that role changes in HR tools flow down to apps fast.

Still, directory sync only controls who has an account and what static role they hold. It stops at the login door and does not watch what happens during an active session. Once a synced user logs into a database or server, the schema has no power. It cannot check individual queries, block risky commands, or rewrite sensitive data in flight.

Static group sync also struggles with temporary tasks like fixing a live production bug. If you add an engineer to an admin group, they keep that access until the next sync cycle. If a query returns customer emails, phone numbers, card numbers, or national IDs, directory sync does nothing. To protect live systems, teams need controls that inspect commands and mask fields in results.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the difference between SCIM and SAML?

SCIM handles user lifecycle tasks like creating, updating, and deactivating accounts across systems. SAML handles the login flow by proving who a user is when they sign in. Teams use both standards together to manage accounts and check logins.

Can teams add custom fields to a scim schema?

Yes, the standard lets teams define custom extensions with their own unique namespace. This lets you pass custom company data like badge numbers or project codes to apps. Both the identity provider and the receiving app must support the custom extension.

How does group sync affect database and server permissions?

Identity providers push group memberships to target systems, which map those groups to local roles. If a synced group maps to a superuser role, every member gets full standing access. That is why teams should pair account sync with runtime checks on actual commands.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.