Agents in a multi-organization SaaS: org_only, b2b_only, b2b_specific

A SaaS company runs AI agents for its own staff and for its customers. Here is how LumoAuth's four access modes keep each agent's approval requests with the right people, and what the setting does not cover.

In a multi-tenant SaaS, one company runs AI agents for its own staff and for many customer companies. LumoAuth gives each agent an access mode for this: Everyone (both), Organization users only (org_only), Customer organization members only (b2b_only) or Specific customer organizations (b2b_specific). The mode sets who may review the agent’s requests for just-in-time permissions, which users the agent may act for in them, and which customers see the agent in their portal. This post follows one team that uses all four.

TL;DR

  • Every agent has one of four access modes. A new agent starts as Everyone, so every reviewer in your organization can decide its requests.
  • The mode applies to requests for just-in-time permissions. A reviewer outside the agent’s audience gets 403 on every channel and never sees the request in an inbox.
  • Customer organization members only admits members of any customer organization. It does not keep two customers apart.
  • For one customer’s data, register one agent per customer and select that one organization under Specific customer organizations.
  • The mode does not limit what the agent can do. Capabilities, budgets and the checks in your own API do that.

Who is the team, and what is the problem?

Acme Corp sells a support desk to other companies. Its LumoAuth organization is acme-corp. Each customer company is a customer organization inside it: Globex and Initech so far. A customer’s employees sign in to the support desk as members of their customer organization. Acme’s own employees are direct users, with no customer organization.

Acme runs three kinds of agents:

  • A refund auditor for Acme’s finance team. It compares refunds with the payment provider’s records.
  • A ticket assistant for customers. It reads a customer’s tickets, drafts replies, and sometimes asks for more access, such as closing tickets in bulk.
  • A help-center editor that all customers share. It proposes changes to the public help articles.

Each agent asks for access above its capabilities through just-in-time permissions. A person reviews each request. Acme has a rule from its customer contracts: a customer’s people approve what touches that customer’s data, and nobody else does. Acme’s finance requests, in turn, are no business of any customer.

On the first day, none of this holds. Acme gave Globex’s support lead a reviewer role, so that Globex can approve its own requests. Every agent still has the default mode. The support lead opens the approvals inbox and sees the refund auditor’s requests next to the ticket assistant’s requests.

What does the access mode control?

The mode names the agent’s audience: the people who may take part in its just-in-time requests.

Mode Label in the portal Who is inside the audience
both Everyone (default) Direct users of your organization and members of every customer organization
org_only Organization users only Staff accounts: your organization’s own users. An account stops being a staff account when it joins a customer organization
b2b_only Customer organization members only Members of at least one customer organization
b2b_specific Specific customer organizations Members of the customer organizations that you select

LumoAuth applies the audience in five places:

  • Review. A person who approves or denies a request needs the jit.approve permission and must be inside the audience. This holds in the portal inbox, the JIT API, the Lumo Authenticator app and approval channels such as Slack.
  • Acting for a user. An agent can start a task with on_behalf_of only for a user inside the audience. When the agent names the user without a delegation token, that user must also consent.
  • Auto-approve rules. A rule approves a request only when the rule’s author is inside the audience, as a reviewer would have to be.
  • The approvals inbox. A reviewer sees only the rows of agents whose audience includes them. The counts on the tabs follow the same rule, so the inbox does not reveal that other requests exist.
  • The customer portal. A customer organization’s portal lists the agents that its members may use. An agent for staff, or for other customers, is not on the list.

The same four options exist for applications, under User access, where they set who can sign in. The guide for multi-customer SaaS covers that side.

How does Acme assign the modes?

Acme ends with this layout:

LumoAuth organization: acme-corp
│
├─ Direct users (Acme staff)
│    └─ Refund auditor ............. Organization users only
│
├─ Customer organization: Globex
│    └─ Ticket assistant · Globex ..... Specific customer organizations [Globex]
│
├─ Customer organization: Initech
│    └─ Ticket assistant · Initech .... Specific customer organizations [Initech]
│
└─ All customer organizations
     └─ Help-center editor ............ Customer organization members only

The team reached it in four steps.

Step 1: the staff agent becomes Organization users only

An administrator opens AI Agents → Agents, opens the refund auditor, and clicks Edit agent. In the section Who may use it, the administrator selects Organization users only and saves.

From that moment, the refund auditor’s requests are gone from the inbox of Globex’s support lead. The auditor is also absent from every customer portal. Only Acme’s direct users with jit.approve can decide its requests. One rule from the earlier posts still applies: the agent’s owner cannot review the agent’s own requests, so a second person in finance holds the reviewer role.

Step 2: the first try for the ticket assistant falls short

Acme had registered one ticket assistant for all customers. The team sets it to Customer organization members only. Acme’s staff can no longer approve its requests, which matches the contracts.

Then the team tests with two reviewers, one at Globex and one at Initech. Both see every request of the ticket assistant, including requests about the other company’s tickets. The mode works as described: a member of any customer organization is inside the audience. It does not compare the reviewer’s organization with the user or the data in the request.

Step 3: one ticket assistant per customer

Acme registers a second agent, so that each customer has its own: Ticket assistant · Globex and Ticket assistant · Initech. Each gets Specific customer organizations, with exactly one organization selected under Allowed organizations.

Now a Globex reviewer sees and decides only the requests of Globex’s assistant. The split brings more than the review boundary. Each assistant has its own credential, its own capabilities and budget, and its own entries in the audit log. If Globex ends its contract, Acme revokes one agent, and Initech’s assistant keeps running.

The edit page refuses the option with no organization selected. Nobody would be inside the audience, and every request would stay open until it expired.

Step 4: the shared agent keeps Customer organization members only

The help-center editor changes public articles that all customers share. Acme wants customers to approve those changes and wants its own staff to stay out. No single customer’s data is involved. For this agent, Customer organization members only is the right mode, and Acme accepts that a reviewer from any customer may decide.

What does a person outside the audience get?

Suppose that a reviewer at Initech holds jit.approve and tries to approve a request of Globex’s assistant through the JIT API. The reviewer’s token is a user access token with the jit:approve scope:

ORG=acme-corp
curl -sS -X POST "https://app.lumoauth.dev/orgs/$ORG/api/v1/jit/approve/$REQUEST_ID" \
  -H "Authorization: Bearer $REVIEWER_ACCESS_TOKEN"

LumoAuth answers 403:

{
  "error": "access_denied",
  "error_description": "Your account is not permitted to approve requests for this agent."
}

A denial gets the same answer, because approving and denying are both review decisions. GET /jit/pending leaves the request out for this reviewer, and so do the portal inbox and the Lumo Authenticator app.

Acting for a user follows the same audience. Globex’s assistant starts a task for Dana, a support employee at Globex, with on_behalf_of. LumoAuth asks Dana first, and her approval is the consent. If the assistant named a user from Initech instead, LumoAuth would refuse the task with 400, and no request would reach anyone. A reviewer cannot approve a request for a user outside the audience either.

LumoAuth reads the memberships at the time of each decision. When a person leaves Globex, or when their membership is suspended, they are outside the audience of Globex’s assistant from that moment. Leaving Globex does not make them one of Acme’s own users either. An account stops being a staff account when it joins a customer organization, and only an Acme administrator can switch that back. The refund auditor therefore stays closed to a former Globex member.

What do customers see?

Each customer organization has a portal at /b2b/acme-corp/globex/, for its own members. Its Agents page lists the agents that Acme made available to that organization. For Globex, the list holds Ticket assistant · Globex and the help-center editor. Each row shows the agent’s ID, its identity type and its access: Selected customer organizations or Customer organizations only.

The page of one agent shows its status and its capabilities. Globex’s members can therefore read what the assistant may do without asking Acme. The refund auditor and Initech’s assistant are not on Globex’s list, and their pages answer with not found for a Globex member.

What does the access mode not do?

The mode is a boundary for people, not for the agent. Four things stay outside it:

  • It applies to just-in-time requests only. Token exchange, linked accounts in the Token Vault, AAuth consent and phone approvals do not read the setting. The switch May act on behalf of users and each user’s own choice control those paths.
  • It does not limit the agent’s actions. Capabilities do that. Give Globex’s assistant only the capabilities that its job needs.
  • It does not separate customer data in your API. Your API must check that a call from Globex’s assistant reads only Globex’s tickets. One agent per customer makes this check simple: the agent ID in the token names the customer.
  • It is not a role. A person inside the audience still needs jit.approve to review. Give customers’ reviewers a role with that one permission, as the JIT docs describe, and no other portal permission.

For rules that depend on the mode, the attribute agent.userAccessMode is available in attribute-based policies. A deny policy can, for example, stop every agent that is not Organization users only from an internal resource.

What is the outcome for Acme?

Acme’s contract rule now holds without a manual process:

Agent Mode Who reviews Seen in customer portals
Refund auditor Organization users only Reviewers in Acme’s finance team, except the owner No
Ticket assistant · Globex Specific customer organizations: Globex Globex reviewers Globex only
Ticket assistant · Initech Specific customer organizations: Initech Initech reviewers Initech only
Help-center editor Customer organization members only Reviewers of any customer All customers

Four habits came out of the project:

  • Set the mode before you give a customer the reviewer role. A new agent is Everyone, and a new reviewer sees every such agent.
  • Use one agent per customer for customer data. A shared agent cannot keep two customers’ reviewers apart.
  • Review the modes when a customer joins or leaves. Add the new organization to the right agents, and revoke the agent of a customer that left.
  • Check the result as a customer. Open the customer portal as a member and read the Agents page. It shows what that customer sees.

How LumoAuth does it

In the Organization Portal, go to AI Agents → Agents, open the agent and click Edit agent. The section Who may use it holds the four modes. Specific customer organizations shows the list Allowed organizations, with every customer organization of yours. You need the agents.edit permission. The setting is not part of the wizard for registering an agent and not part of the Admin API. LumoAuth records a change of the mode or of the selected organizations in the audit log as agent.updated, with the old and the new value.

Customer organizations are under Identity → Customer organizations. Reviewers decide requests in the approvals inbox at /orgs/{orgId}/portal/approvals, in the Lumo Authenticator app, in an approval channel, or with POST /orgs/{orgId}/api/v1/jit/approve/{requestId}.

The docs on the agent’s audience describe each place where the mode applies, and the governance docs list every review rule. This series starts with What is an AI agent identity?, and the previous post covers the wizard that registers an agent.

Standards involved

  • OAuth 2.0 rich authorization requests, RFC 9396, the format of the authorization_details in a just-in-time request
  • OAuth 2.0 token exchange, RFC 8693, whose act claim names the agent in a token that it holds for a user
  • OAuth 2.0 bearer token usage, RFC 6750, for the reviewer’s access token on the JIT API

The access modes themselves are LumoAuth’s own setting. No standard defines them. The full list of standards is on the standards reference.

FAQ

Which access mode does a new agent start with? Everyone. Direct users of your organization and members of every customer organization are inside the agent’s audience. You change the mode on the agent’s edit page, in the section Who may use it.

Can one customer’s reviewer approve a request that concerns another customer? With Customer organization members only, yes: a member of any customer organization is inside the audience. To keep customers apart, register one agent per customer and set each to Specific customer organizations with that one organization.

Does the access mode limit what the agent can do? No. The mode sets who may review the agent’s just-in-time requests, which users the agent may act for in them, and which customers see the agent in their portal. Capabilities, budgets and your own API’s checks limit what the agent can do.

What happens when a reviewer leaves the customer organization? LumoAuth reads the memberships at the time of each decision. A person who is no longer an active member of a selected organization cannot decide the agent’s requests from that moment, and the requests leave that person’s inbox.

Can I set the access mode through the Admin API? No. The access mode and the list of selected organizations are set in the Organization Portal, on the agent’s edit page. A change of the mode or of the selected organizations is recorded in the audit log as agent.updated.


Related: AI agent identity on the solutions pages, and capabilities, not scopes on this blog.

Register your first agent at app.lumoauth.dev/register.

Last updated .

Ship passwordless sign-in this week. Put guardrails on your agents today.

The Developer plan is free for 10,000 monthly users and ten agents, with no card. Everything uses open standards, so moving in or out is a config change.