B2b User Provisioning
You set up b2b user provisioning by linking partner directories to your apps. This flow creates accounts and assigns roles when partner staff join or leave. Teams often use single sign-on and directory sync to run this setup. Still, broad partner roles often give outside users too much power inside databases. When a partner gets a wide role, every query they run carries high risk. How b2b user provisioning works in practice In a standard setup, a partner team manages its own staff directory.
User Provisioning (SCIM): the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up b2b user provisioning by linking partner directories to your apps. This flow creates accounts and assigns roles when partner staff join or leave. Teams often use single sign-on and directory sync to run this setup. Still, broad partner roles often give outside users too much power inside databases. When a partner gets a wide role, every query they run carries high risk.
How b2b user provisioning works in practice
In a standard setup, a partner team manages its own staff directory. You link their directory to your login system using standard identity protocols. When the partner adds a worker, your system makes a local account. You map their group names to your internal roles during this step.
Next, you tie those roles to your backend databases, cloud consoles, and servers. The partner worker logs in once and gets a token for their session. Your internal tools check that token to see which group the user holds. If the group matches a database role, the database lets the user in.
When the partner worker leaves their firm, their admin removes them from the directory. The sync process then turns off their account in your system right away. This flow stops old partner accounts from sitting open for months.
What identity sync solves and what it misses
Directory sync solves the problem of manual account creation and slow removals. Your team does not need to type in emails or reset partner passwords. You also get a clear list of which outside users hold active accounts.
Still, account creation rules only decide who can log in to a tool. They do not inspect what a user does after the session starts. Once a partner logs in, the database trusts every command their role allows.
Partner staff often need to check live data to fix a shared bug. If you grant a read role, they can read whole tables at once. Those tables often hold emails, phone numbers, card numbers, and national IDs. A static role cannot rewrite matched fields in results during a live query.
User Provisioning (SCIM): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The same problem happens when contractors or support partners need write rights. A role that allows one table update also allows a bulk delete command. Identity sync has no way to pause a risky command for human review.
Why team roles grow too wide over time
Managing fine roles for twenty different partner firms takes a lot of work. Each partner needs slightly different tables, views, or server commands to do their job. Building custom roles for every single partner task slows down your platform team.
To save time, admins often create one shared partner role with broad rights. Every outside user gets placed into this wide bucket during account setup. Over time, that shared role collects extra permissions from old projects and tickets. Soon, dozens of outside workers can run heavy queries on your core data.
To reduce this risk, teams must look past simple account creation rules. You need controls that check individual queries and commands while the session runs. Adding query-level checks and data masking keeps partner work safe without extra roles.
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 single sign-on and user provisioning?
Single sign-on checks who a user is when they log in to an app. User provisioning creates, updates, and deletes the user account and its assigned roles.
How do you revoke partner rights when a contract ends?
You cut the directory link or remove the partner group from your system. This step disables all linked partner accounts and blocks new logins right away.
Why are database roles not enough for partner contractors?
Database roles only check permissions at the table or view level on login. They do not mask emails or card numbers in results or block bad commands.
Related guides
In this post