Adfs Scim

Published
Length
3 min read

Luis Felipe Dias

All posts

Active Directory Federation Services does not include a built-in client for adfs scim user sync. To set up adfs scim, teams must add an external sync engine or custom script that reads Active Directory and sends user updates to target apps. Many teams start by mapping broad Active Directory groups to admin roles in their databases and cloud tools. When these roles are too wide, every synced engineer gets full write permissions across sensitive systems. How an adfs scim workflow operates ADFS

Scim: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

Active Directory Federation Services does not include a built-in client for adfs scim user sync. To set up adfs scim, teams must add an external sync engine or custom script that reads Active Directory and sends user updates to target apps. Many teams start by mapping broad Active Directory groups to admin roles in their databases and cloud tools. When these roles are too wide, every synced engineer gets full write permissions across sensitive systems.

How an adfs scim workflow operates

ADFS handles log in requests through federated tokens. Meanwhile, the SCIM protocol manages user lifecycle events like account creation and removal. Because ADFS only issues tokens at log in time, it cannot push background user updates on its own. Teams bridge this gap by running a separate sync service alongside their directory.

First, the sync service reads user profiles and group memberships from the underlying Active Directory domain. Next, it translates those directory attributes into standard SCIM JSON payloads. The service then sends those payloads over HTTPS to the target app or database management tool. When HR disables a user in Active Directory, the sync tool sends a disable call to the target system. This setup keeps user lists and group memberships aligned across local domains and cloud apps.

Where directory group mapping falls short

Syncing users and groups through SCIM solves account sprawl and speeds up offboarding. When a person leaves the team, removing them from Active Directory revokes their app accounts on the next sync cycle. Admins no longer need to create or delete accounts by hand in every single tool.

Still, directory sync only controls who has an account and which static role they hold. It does not inspect or control what an engineer does after they log in to a database or server. If a SCIM group maps to a database role with read and write rights, every member holds those rights all day. A synced user can still run a destructive delete query or pull a full table of customer phone numbers and emails. SCIM also works on a polling schedule. As a result, a revoked user may keep an active session until the next sync runs and tokens expire.

Managing permissions beyond static directory groups

To reduce risk, teams separate basic account creation from runtime permission checks. They use SCIM to create low-privilege base accounts in target systems. Instead of granting permanent admin roles through group sync, they keep standing permissions minimal. Teams then review and approve sensitive queries or commands at the moment an engineer runs them. They also apply data masking rules that rewrite matched fields like card numbers or national IDs in query results.

Scim: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

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 inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.

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 approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Does ADFS support SCIM out of the box?

No, ADFS only handles federated log in flows using protocols like SAML and OpenID Connect. To push SCIM provisioning calls, you must deploy a separate sync tool or cloud directory bridge that reads from Active Directory.

How fast does SCIM revoke a user session?

SCIM revocation depends on the sync interval of your provisioning tool, which often runs every twenty to forty minutes. Even after SCIM disables the account, active database connections or valid session tokens may keeps the session active until they time out.

Should we map Active Directory groups directly to database admin roles?

Mapping directory groups directly to high-privilege database roles gives too many people standing write permissions. It is safer to sync users with minimal base roles and require per-query approval or masking for sensitive data operations.

Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.

Teams test new role rules in staging first. Clear owner lists speed up each audit. Small role scopes cut down on risk. Regular log checks catch drift right away.

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.