Scim User Schema

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a scim user schema by mapping your identity fields to target apps. This standard format lets your provider create, update, and remove user accounts on its own. Most teams map group names to broad roles inside their cloud tools and databases. When those roles are too wide, one account can change or delete critical production data. How the scim user schema works in practice The scim user schema is a standard set of rules for user identity data. It defines common fields like user name

User Provisioning (SCIM) + 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.

You set up a scim user schema by mapping your identity fields to target apps. This standard format lets your provider create, update, and remove user accounts on its own. Most teams map group names to broad roles inside their cloud tools and databases. When those roles are too wide, one account can change or delete critical production data.

How the scim user schema works in practice

The scim user schema is a standard set of rules for user identity data. It defines common fields like user names, work emails, phone numbers, and active status. Your identity provider holds the main record for every person on your team. When someone joins your company, you add their details to the identity provider once.

The provider then sends a structured web request to your connected cloud apps. The receiving app reads the fields and builds a local account for that person. It also reads group fields to place the user into the right local role. If a person changes teams, the provider updates the group field right away. When someone leaves the company, the provider sends an update to turn off the account.

Teams also use the enterprise extension to share extra details like department and manager names. You map each source field in your directory to a matching target field. Both sides must agree on a unique key, such as a work email address. If a required field is missing, the sync job fails and writes an error log. You should check these sync logs often to fix broken mappings before users get stuck.

What directory sync solves and what it leaves open

Automated user sync stops old accounts from staying active after people leave the team. It also saves hours of manual work for admins who manage hundreds of tools. You get a clean record of who holds an account in every connected system. Auditors like this setup because one central directory controls who can log in.

Still, directory sync only decides who gets an account and a static role. It does not check what a user actually runs after they log in. A developer mapped to a database group keeps that broad role all day long. Once inside the database, they can run any query that their static role allows. Sync rules cannot stop a bad command from dropping a table during a live session.

User Provisioning (SCIM) + API Schema Validation: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Static roles also do not rewrite sensitive fields when a user reads production tables. If a table holds phone numbers, card numbers, or national IDs, queries return them. Directory sync has no way to inspect or mask those query results in flight. To control live commands and mask results, you need controls at the session level.

Best practices for mapping user attributes

Keep your attribute mappings simple when you set up a new app sync. Map only the core fields that the target system needs to create an account. Use an immutable ID from your directory alongside the user email to track changes. People change their names or emails, so a stable ID stops duplicate accounts.

Test your group mappings with a small pilot team before you sync everyone. Check that removing a user from a group strips their role in the target app. Some apps turn off the user account, while others delete the record for good. Make sure your setup turns off accounts first so you do not lose audit history. Review your group assignments every quarter to trim wide roles that teams no longer need.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

What is the difference between core and enterprise user schemas?

The core schema holds basic traits like user name, work email, and active state. The enterprise extension adds company details like cost center, department name, and manager record.

How does SCIM handle role assignments in databases and apps?

It sends group memberships from your identity provider to the target system. The target app maps those group names to its own local roles and permissions.

Does user provisioning control what queries an engineer can run?

No, provisioning only sets up the account and assigns a static role at login. It cannot inspect, block, or mask individual queries during a live database session.

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.