Organizations and audit
This chapter is for the people who run a company's Leafen: an organization's owners and admins, and the server's administrators. It covers the organization, its admin roles and groups, single sign-on and SCIM, the enterprise controls, and the records Leafen keeps of who did what. Members, invitations and teamspaces of one workspace are in Workspaces and members. For a law firm, clinic or public office, read Leafen in a regulated organization as well.
Every feature here is in every Leafen: there are no plans.
The organization
An organization holds workspaces and the people in them. Setting a server up makes one for the first workspace, named after its owner in the language the workspace is made in (for example "Alex Example's Organization"), with that person as its Owner. An organization doesn't take over workspaces its people made outside it.
Open the workspace name in the sidebar → Settings → Organization (under Admin). The page shows:
- Organization admin: Organization name, which the owner changes
and saves with Save (an agent does it with the settings change
rename), and your role. - Members: everyone in the organization's workspaces, with their role.
- Groups: Add group makes a group of people across the organization. Groups an identity provider sends over SCIM show here too and are changed there. Pages are shared with a workspace's own groups (Settings › People › Groups), not with these.
- Admin roles: give a member one area of the organization's settings. They see only the settings their role covers; their access to pages doesn't change.
- Data retention: how long the updates feed and page analytics are kept.
- Audit log: the organization's record, below.
The owner passes the organization on with Make owner in a member's ⋯ menu; the previous owner stays a member who manages people. One person can own several organizations, so it passes to someone who has made a workspace of their own too. A workspace a person makes goes into the first organization they made. Making someone a workspace's owner leaves its organization — security, audit log, key policies and admin roles — with the organization's owner, as the question before it says; the new owner reads the workspace's own lines of the audit log under Settings → Organization.
Admin roles
| Role | What it may do |
|---|---|
| Compliance admin | View the audit log and the data loss prevention rules, run content search, and manage legal holds. |
| People admin | View and manage the organization's members, guests and groups. |
| IT admin | Manage identity, security and integrations across the organization. |
| Analytics viewer | View members, content and search analytics in the organization's workspaces. |
| Billing admin | Manage the organization's storage and file usage. |
Identity: domains, single sign-on and SCIM
Settings → Identity (under Admin):
- Verified domains → Add domain: add your company's email domain and put the TXT record the screen gives in its DNS. Leafen checks it; DNS changes can take minutes to hours.
- User management then applies to everyone on your verified domains: Managed users dashboard, whether they may edit their profiles or join workspaces your organization doesn't own, Allowed secondary emails, Session duration (180 days by default), Log out all managed users and Reset passwords for all managed users.
- SAML single sign-on (SSO) → Enable SAML SSO. Give your identity provider the SAML metadata URL, or the Assertion Consumer Service (ACS) URL and the SAML SSO Entity ID the page shows. The ACS URL and the entity ID hold from before anything is saved, so the provider's side can be set up first and its values entered under Edit SAML SSO configuration after. You choose whether people must use SSO or may use any method; organization owners can always log in with a password. Automatic account creation makes a Leafen account for a new person who logs in through SSO, in the workspaces listed under Linked workspaces.
- SCIM provisioning → Use SCIM provisioning: your identity provider creates and deactivates the organization's users and groups at the Base URL shown, with a token from SCIM tokens → Create token. A token shows only once. Only people on verified domains are provisioned.
Enterprise-managed connections → Approved MCP clients only lets only the MCP clients you approve connect to the organization's workspaces; removing an approval stops its tokens at once (see Agents).
The addresses a SAML provider uses follow the server's address; see Outside address.
Enterprise controls
Settings → Enterprise controls (under Admin):
- Data loss prevention: Use data loss prevention checks for sensitive terms and blocks the ways out you choose. Edit sensitive terms takes one term on each line, found as written whatever its letters' case; patterns such as regular expressions aren't read. What the policy refuses says which rule refused and, for a term, the line that holds it, never the term. Compliance admins see the rules here without changing them.
- Audit log: Audit record retention keeps records by default; Open audit log goes to the log.
- eDiscovery: Create evidence export searches the organization's
pages, blocks, comments and file details, the trash included, and downloads
the result as a file. Each page's earlier wording from its version history
comes along as
page_versionitems, one for every minute that changed its words or name, with when and by whom. A search nothing matches says so and saves no file. - Legal holds: Create legal hold keeps what it holds from being deleted for good when someone deletes it. Its pages are picked from this organization's workspaces only. In the trash, a held page says the hold keeps it to the workspace's owner and to the organization's compliance admins.
- Notion-compatible Admin API: the legal hold, workspace export and managed user session operations of Notion's Admin API, at the address and with the tokens this section gives.
Settings → Security holds the workspace's switches, such as Disable public forms, page links and sites, Disable duplicating pages to other workspaces, Disable page exports, view links for agents and User HTML. With Disable duplicating pages to other workspaces on, a page's Move to shows the other workspaces dimmed, with the reason beside them: the page neither moves nor is duplicated there.
The records Leafen keeps
| Record | Where | Who reads it |
|---|---|---|
| Organization audit log | Settings → Organization → Audit log | Owners and compliance admins. A workspace's owner reads that workspace's lines there — its members, guests, teamspaces, sharing and settings, not the reads and edits of its pages, which each page's read log and the workspace's updates show. Filter by person, kind and dates; Export CSV. A change made through an agent's or an integration's connection names it beside the person; a form opened or closed says to whom before and after, a data loss prevention change which switches it turned (the sensitive terms by their number only), and an agent's database query which databases it read. |
| Server audit log | Settings → Server → Audit log | Server administrators: logins and their attempts, device codes, setup and administrator changes, every change an administrator makes to the server (outside access, apps, backups, continuous replication, the standby server's code, pairing and takeover), a standby taking over, and an agent connected with an administrator's rights. Workspace member and ownership changes aren't here: its first line says they are in the organization audit log, with Open organization audit log for one who reads it. |
| Server administrator log | Settings → Security → Server administrator log | The workspace's owner and its organization's admins: what server administrators opened or changed in this workspace. |
| Request log | Settings → Server → Audit log → Request log | Server administrators, to find out what went wrong. |
| Read log | On unless a server administrator turns off Record reads in Settings → Server → Audit log | People with full access and the organization's compliance admins: who read each page, item and file, when and how, from the page's ⋯ › More › Read log. |
| Login history | Settings → Account (the row with your name) → Login history | The account's own login attempts. |
The request log keeps entries for 5 days by default and one in a hundred successful requests; failed requests, requests that take a second or more, administrators' changes, logins and setup are always kept, up to 300,000 entries, the oldest going first. The audit logs are kept apart and aren't affected. How the read log and the request log are stored is in Self-hosting: Request log and Read log.
Server administrators can see every workspace on the server, read only; each workspace's owner sees what they opened or changed in the Server administrator log. See Self-hosting: What administrators see.
Names, limits and defaults
| Name | Limit or default | Notes |
|---|---|---|
| Session duration for managed users | 180 days | Set in Identity. |
| Updates feed retention | 1 year | Data retention on Organization. |
| Page analytics retention | 1 year | Analytics ranges go no further. |
| Audit record retention | Kept | Unless you set a period. |
| Request log | 5 days, one in a hundred successful requests | At most 300,000 entries. |
| SCIM token | Shown once |
For agents and the API
An agent connected as an organization's admin can read and change these
settings through the API, as the screens do: leafen_operations finds the
operations and leafen_call runs them. An identity provider's SCIM
requests go under the Base URL on Identity, such as
/api/leafen/v1/scim/v2/Users, and Notion-compatible Admin API calls go to the
address on Enterprise controls. An agent works only within its person's
role.
Differences from Notion
- Every enterprise feature is in every Leafen, with no plan.
- The settings window also holds the server's settings, for the server's administrators, and the enterprise controls and the organization stay among the Admin items.
- Nobody outside your organization finds a member's name and photo by email.
- An organization doesn't take over workspaces its people made outside it.
- Custom admin roles, a Notion beta, are not in Leafen yet.
- An organization decides which MCP clients may connect, instead of Notion AI's settings.