Connect your directory to one of your SSO connections, so your identity provider adds and removes your people in Tilt Base. Roles start set in Base; you can let your directory set them later.
## Before you start
- Tilt has switched directory sync on for your organisation, as well as SSO. Until then, the page's directory part says to ask Tilt. Tilt switches this on for your organisation; contact [support@tilt.legal](mailto:support@tilt.legal).
- You have an SSO connection to Microsoft Entra ID, Okta, or another identity provider that sends changes by SCIM 2.0. Base doesn't set up a directory on a Google Workspace connection. See <mention-page url="https://app.notion.com/p/41b4815eed4f81df82f0c80b7ee3a569">Set up SSO</mention-page>.
- Tell your Admins: once you have a directory, nobody can be invited, and pending invitations are withdrawn.
## What setting up your first directory does
Before it sets up your first directory, Base:
1. turns just-in-time sign-up off on every SSO connection, so only your directory adds people;
2. stops inviting people who sign up at your verified domains;
3. withdraws every pending invitation, and sends no more while you have a directory;
4. creates the directory.
Each step is safe to run again: if set-up stops part-way, set it up again and Base carries on. Members already in your organisation stay.
## Set up a directory
1. Go to Settings › Organisation › SSO and directory.
2. Under **Directory**, select **Set up directory**.
3. Choose the SSO connection your directory belongs to. A connection that can't have one says why. The dialog also lists what Base turns off first.
4. Base sets up the directory and shows its **SCIM address** and **Token**, with your identity provider's steps.
<callout icon="⚠️" color="yellow_bg">
	**The token is shown once.** Copy it now: Base doesn't keep it and can't show it again. Give it to your identity provider, then select **I've copied the token**. If it's lost, replace it.
</callout>
## Configure your identity provider
Give your identity provider the SCIM address and the token.
<tabs>
	<tab icon="🔷">
		Microsoft Entra ID
		1. In the Microsoft Entra admin centre, open the Tilt Base enterprise application, choose **Provisioning** and set **Provisioning Mode** to Automatic.
		2. Under **Admin Credentials**, paste the SCIM address as the **Tenant URL** and the token as the **Secret Token**, then choose **Test Connection** and save.
		3. Under **Mappings**, check users map `userName`, `name.givenName`, `name.familyName`, `email` and `active`, and map `jobTitle` to `title`, so each person's position comes from Entra ID.
		4. Under **Settings**, set **Provisioning Status** to On and save. Entra ID then sends changes about every 40 minutes.
	</tab>
	<tab icon="🔑">
		Okta
		1. In the Okta Admin Console, open the Tilt Base app's **Provisioning** tab, choose **Configure API Integration** and switch on **Enable API integration**.
		2. Paste the SCIM address as the **SCIM connector base URL**, set **Unique identifier field for users** to userName, and paste the token as the **API Token**. Test the credentials and save.
		3. Under **To App**, switch on **Create Users**, **Update User Attributes** and **Deactivate Users**, and save.
		4. Under **Attribute Mappings**, check `email` (`user.email`) is sent, and title for each person's position.
	</tab>
	<tab icon="🔐">
		Another SCIM provider
		1. In your identity provider, set up SCIM 2.0 provisioning for Tilt Base, with the SCIM address as its base URL and the token as its bearer token.
		2. Send each person's email address in the emails attribute, their names, and their job title as title, for their position.
		3. Assign the people who use Tilt Base.
	</tab>
</tabs>
To see the SCIM address and steps again, select the directory's card, or **SCIM details** in its **…** menu. The token isn't shown again.
## Job titles become Position
Each person's job title, sent as `title`, becomes their **Position** in Tilt Base. Their name, email and position then read "Your firm's directory keeps this up to date" on their Account page, and they can't change them there.
## Replace the token
1. In the directory's **…** menu, select **Replace token**, and confirm.
2. Copy the new token, which Base shows once, and give it to your identity provider straight away: the old one stops working shortly.
## One directory, one connection
A directory belongs to one SSO connection, and adds and removes the people at that connection's domains. Each connection can have one directory, and Base won't remove a connection while its directory uses it.
The directory's card shows **Active** or **Paused**, and **Roles set in Base** or **Roles set by your directory**. Its **…** menu has **SCIM details**, **Replace token**, **Pause directory** or **Resume directory**, and **Remove directory**.
## Troubleshooting
- **"Tilt hasn't switched directory sync on."** Ask Tilt to switch it on: contact [support@tilt.legal](mailto:support@tilt.legal).
- **A Google Workspace connection can't be chosen.** Base sets up only directories that your identity provider sends changes to by SCIM, and Google Workspace's isn't one.
- **"Add an SSO connection first."** A directory belongs to one. See <mention-page url="https://app.notion.com/p/41b4815eed4f81df82f0c80b7ee3a569">Set up SSO</mention-page>.
- **A connection says it has a directory already.** Each connection can have one.
- **The token is lost.** Select **Replace token**.
## Related
- <mention-page url="https://app.notion.com/p/41b4815eed4f816da432c280738cffe2">SSO and directory sync</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f8106881cd767f9a68dba">Roles from your directory</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f81238c01c7fdfb1374e4">Pause or remove a directory</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f81dc92c6cf6bdd40f80e">Members and invitations</mention-page>