C
Identity & Access

Clerk AI Integration

Connect Clerk to BeforeQuery for grounded AI answers and agent actions across Identity & Access.

What is it?

About Clerk

Clerk is one of the Identity & Access platforms BeforeQuery connects to. Once linked, the platform's data becomes a first-class source for grounded AI answers and a target for policy-gated agent actions — the same identity, approval, and audit-log guarantees every other integration ships with.

Setup

How to connect Clerk

  1. Step 01

    In the BeforeQuery dashboard, go to Integrations → Identity & Access and select Clerk.

  2. Step 02

    Sign in to Clerk with an account that has permissions to grant BeforeQuery the Identity & Access scopes required.

  3. Step 03

    Confirm the connection. Clerk is now available as a source and action target for every playbook in your workspace.

How BeforeQuery uses Clerk

What the agent does with your Clerk connection

  • 01

    Read user, group, and app-assignment data from Clerk to feed the identity plane of the Context Graph.

  • 02

    Provision, deprovision, and update accounts across every app connected to Clerk via SCIM.

  • 03

    Reset passwords, unlock accounts, and re-enroll MFA — self-service where policy allows, escalated where it doesn't.

  • 04

    Run periodic access reviews and just-in-time access requests with your approval matrix.

Use cases

What teams actually do with the Clerk integration

Self-service account unlock

User in Slack: "my Clerk is locked, unlock me?" → BeforeQuery verifies identity via MFA challenge, unlocks the account, and confirms in 10 seconds. No IT ticket, full audit trail.

Just-in-time production access

Engineer needs prod DB access for 4 hours. Requests in Slack with justification → BeforeQuery routes to security lead → on approval, grants access via Clerk with auto-expire at 4-hour mark. Auto-revoked; audit-logged.

Quarterly access review

Every quarter, BeforeQuery pulls the full Clerk access map, groups by team + role, and sends managers a review packet: "confirm each of your reports still needs these apps." One-click approve; unresponsive access is flagged for revocation.

Answer questions grounded in Clerk

Employees and customers ask Clerk-related questions in Slack, Teams, or the widget — BeforeQuery answers with the exact Clerk record shown alongside the response. No context switching, no "log into Identity & Access to check" round-trips.

Clerk — Frequently Asked Questions

Common questions about connecting BeforeQuery to Clerk.

Depends on the playbooks enabled. Read-only for Q&A. User-mgmt scopes for provisioning. Group-mgmt for access reviews. You approve each scope on install; you can remove scopes anytime and the corresponding playbooks disable automatically.
Only if explicitly scoped and approved. Policy writes always require a policy-owner approver, log the before/after state, and are fully reversible via the audit trail. Most customers keep policy writes off and use BeforeQuery for user-lifecycle actions only.
Standard OAuth 2.0 where Clerk supports it, otherwise API-key or bearer-token auth. Credentials are stored encrypted at rest (AES-256-GCM) per workspace, never shared across customers, and rotated on request. The connection is scoped to the least-privilege set of scopes each playbook needs — you approve the scope list on install.
No. Your Clerk data feeds only your workspace's own agents and answers. Nothing is used to train a shared model, and nothing crosses workspace boundaries. Bring-your-own-model is available on Enterprise if you want to pin inference to your own OpenAI / Anthropic / self-hosted deployment.
Yes. Every Clerk integration is scoped at install time — you pick which resources, users, or record types are visible. You can further restrict per-playbook: a single playbook only touches the specific Clerk objects it needs. Scope changes take effect on the next sync.
Every write is logged with the acting user, the playbook that fired it, the exact operation, the target entity IDs, and the timestamp — all in the immutable audit log. Writes are rehearsable in simulation mode against a copy of live data before they touch Clerk for real.

Ready to connect Clerk?

Start free. No credit card required. Connect your first integration in under 5 minutes.