Each directory has its own choice of who sets roles, under **Groups and organisation roles** on Settings › Organisation › SSO and directory. A new directory starts with roles set in Tilt Base, and you can switch at any time.
## The two choices
<table header-row="true">
<tr>
<td></td>
<td>**Roles set in Base** (the default)</td>
<td>**Roles set by your directory**</td>
</tr>
<tr>
<td>Who sets roles</td>
<td>Admins, on Members</td>
<td>Groups in your identity provider, mapped to roles</td>
</tr>
<tr>
<td>What your directory does</td>
<td>Adds and removes people only</td>
<td>Adds and removes people, and sets their roles</td>
</tr>
<tr>
<td>Roles of the people your directory manages</td>
<td>Admins change them as usual</td>
<td>Read-only in Base</td>
</tr>
<tr>
<td>Keeping an Admin</td>
<td>Base won't let Admins remove the last active Admin</td>
<td>Base no longer keeps one: your directory decides who holds Admin</td>
</tr>
</table>
A group can map to <span color="blue_bg">Admin</span> or <span color="purple_bg">Contributor</span>. Someone in several mapped groups takes the strongest role, and people in no mapped group have no role, so they're Members. <mention-page url="https://app.notion.com/p/41b4815eed4f81b5a34bd334676bcbb3">Roles and permissions</mention-page> says what each role can do.
## Map groups to roles
You can map groups before you switch. While roles are set in Base, mappings set nobody's role; they take effect once your directory sets roles.
1. Under **Groups and organisation roles**, select **Map a group**.
2. Choose a group, then a role: Admin or Contributor.
3. Select **Map group**.
To change a mapped group's role, choose another from its select. Choose **Not mapped** to stop mapping it.
- Mappings are replaced as a whole: each change saves the full set, with each group mapped at most once.
- While your directory sets roles, a change applies at once to the people a mapping already set. Others take their mapped role when their groups next change in your identity provider.
- Base lists the groups your identity provider has sent. If none show, assign groups to the Tilt Base application in your identity provider.
- If Base can't list your directory's groups, it says so and keeps the mappings as they are. Try again later.
## Let your directory set roles
1. Under **Who sets roles**, select **Roles set in Base**.
2. Choose **Roles set by your directory**.
3. Read the warning, then select **Let your directory set roles**.
<callout icon="⚠️" color="yellow_bg">
	**This takes roles away at once.** Everyone your directory added loses the role Base gave them, unless a mapping set it the last time your directory set roles. Until their groups next change in your identity provider, they have no role, even in a group mapped to one, so your organisation may have nobody who can manage it meanwhile. People Base added keep their roles until a mapped group takes them, and Base no longer keeps an Admin for you.
</callout>
Map your groups before you switch, so people can take their roles as soon as their groups next change.
## Switch back to roles set in Base
1. Under **Who sets roles**, select **Roles set by your directory**.
2. Choose **Roles set in Base**.
3. If Base asks **Who manages** your organisation, choose an active member to hold Admin. It asks when nobody whose account is active would hold Admin, and you can choose yourself.
4. Select **Save**.
Everyone keeps the role they hold now, and Admins change roles on Members from then on.
## While your directory sets roles
- On Members, the roles of the people your directory manages are read-only. Hover over a role to see why.
- If nobody whose account is active holds Admin, Members and the SSO and directory page show "Nobody active can manage everything in" your organisation. Fix it in your identity provider: put someone in a group mapped to Admin.
## Troubleshooting
- **No groups to map.** Your identity provider hasn't sent any yet. Assign groups to Tilt Base there.
- **"Your directory's groups can't be listed now."** Base keeps the mappings as they are. Try again later.
- **Someone in a mapped group still has no role.** They take it when their groups next change in your identity provider.
## Related
- <mention-page url="https://app.notion.com/p/41b4815eed4f81ad9bf2c175e15637d2">Set up directory sync</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f81b5a34bd334676bcbb3">Roles and permissions</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f81dc92c6cf6bdd40f80e">Members and invitations</mention-page>
- <mention-page url="https://app.notion.com/p/41b4815eed4f81238c01c7fdfb1374e4">Pause or remove a directory</mention-page>