atlas-orgs-b2b
Skill0 starsChanged 42 days agoMITView on GitHub
Set up Atlas (atlasauth.net) organizations / B2B multi-tenancy — create orgs, add memberships with roles, invite users, enable enterprise SSO (SAML / OIDC) and SCIM directory sync, and read the active-org claim (org_id / org_role / org_permissions) from the session. Use when the user wants multi-tenant orgs, teams, B2B login, enterprise SSO, SCIM provisioning, or per-org roles/permissions with Atlas.
In this repository5 other files it gives its agents.
- atlas-fgaSkill
- atlas-machinesSkill
- atlas-migrateSkill
- atlas-setupSkill
- atlas-verify-backendSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
All management calls go to the Backend API https://api.atlasauth.net with an Authorization: Bearer sk_… header.
- Very specific: line 22
Create a connection, usually org-bound.
- Very specific: line 37
When a user acts within an org, the session JWT carries org_id, org_slug, org_role, and org_permissions[].
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Atlas organizations & B2B (SSO + SCIM)
All management calls go to the Backend API https://api.atlasauth.net with an Authorization: Bearer sk_… header. Use @atlasauth/backend's createAtlasClient({ secretKey }) (or the per-language SDK / the atlas CLI). Frontend uses <OrganizationSwitcher />, <OrganizationProfile />, <CreateOrganization />, useOrganization() from @atlasauth/react.
1. Organizations
POST /v1/organizations— body:name(required),slug(required),created_by(required — an Atlas user id, seated as the org admin), optionalmax_allowed_memberships. Emitsorganization.created.GET /v1/organizations,GET /v1/organizations/:id,PATCH /v1/organizations/:id,DELETE /v1/organizations/:id.PUT /v1/organizations/:id/metadata,GET /v1/organizations/:id/entitlements,GET /v1/organizations/:id/hierarchy,PATCH /v1/organizations/:id/parent(org hierarchy).
2. Memberships, roles & invitations
POST /v1/organizations/:id/memberships— add an existing instance user with a role; the seat cap is enforced.GET /v1/organizations/:id/memberships— list members.POST /v1/invitations(and/bulk),POST /v1/invitations/:id/revoke,GET /v1/organizations/:id/invitations— email invites.- Roles & permissions are the instance RBAC catalog; a member's permissions ride the session as
org_permissions.
3. Enterprise SSO (SAML / OIDC)
Create a connection, usually org-bound. POST /v1/sso_connections:
type:"oidc"|"saml"|"discourse";organization_id(null = instance-wide);status:draft|active|disabled.- OIDC:
oidc_issuer,oidc_client_id,oidc_client_secret(write-only), optionalmanual_endpoints. - SAML:
saml_idp_entity_id,saml_idp_sso_url,saml_idp_certificate(PEM, write-only),saml_sp_entity_id,saml_allow_idp_initiated,saml_sign_authn_requests,saml_want_response_signed. - Routing & JIT:
allowed_domains[](route a login by email domain),claim_role_mappings[](map an IdP claim value → orgrole_id),default_role_id,provisioning_mode(memberdefault, orend_userinto the reader pool). GET /v1/sso_connections/:id/saml_metadata— the SP EntityDescriptor XML (entityID + ACS URL) to hand the customer's SAML IdP (public, no secret).GET /v1/sso_connections?organization_id=…list;PATCH/DELETE /v1/sso_connections/:id(a secret is only re-encrypted when a new one is supplied; reads reporthas_secret, never the secret).- Self-service onboarding:
POST /v1/sso_onboarding_profiles+/ticketslets the customer's own admin configure their IdP via a scoped ticket.
4. SCIM directory sync
POST /v1/scim_tokens— mint a SCIM provisioning token for an org (revealed once);POST /v1/scim_tokens/:id/revoke.POST /v1/scim_provisioning_targets(+PATCH/DELETE) — push provisioning the other direction;/test,/sync_user,/sync_group.- Hand the SCIM base URL + bearer token to the customer's IdP (Okta/Entra/etc.) so users/groups provision and deprovision automatically.
5. The active-org claim
When a user acts within an org, the session JWT carries org_id, org_slug, org_role, and org_permissions[]. On the backend, gate with the verified session (see atlas-verify-backend):
const { has, claims } = await atlas.authenticateRequest(req);
claims.org_id; // the active org
has({ role: 'org:admin' }); // active-org role
has({ permission: 'org:billing:manage' });The frontend switches the active org with <OrganizationSwitcher /> / useOrganization(); switching re-mints the session with the new org claims.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

