# SSO and MFA

Let your users sign in with your own directory.

## The second factor, first

Without SSO, the second factor is **required for all accounts**, administrators included. At each sign-in, a one-time code goes out by e-mail or SMS, as the person chooses in their profile. Security messages always go out, even if the person has turned off their notifications.

## The SSO steps

Naoshift acts as an OpenID Connect client of your directory: Keycloak, Entra ID, Okta or another.

1. Open **Settings › Organization › Single sign-on**.
2. Copy the redirect address shown, and declare it in your directory, with a new client.
3. In Naoshift, enter the name shown on the button, the client identifier, its secret and the discovery address of your directory.
4. List your e-mail domains, one per line: they route your users to this directory at sign-in.
5. Choose who may sign in, and save.
6. Click **Test the connection**, then **Enable**.

## Three decisions to make

| Decision | The choices | Our advice |
|---|---|---|
| **Who may sign in** | Accounts already linked, those with a pending invitation, or account creation at first sign-in | Start with invitations, open up afterwards |
| **The second factor** | Naoshift's code, or your directory's | Only delegate if your directory really enforces it. Then require its proof, rather than taking its word |
| **Passwords** | Accepted, or refused for your company | Refuse them once SSO is proven |

> Refusing passwords locks nobody out: an administrator with a password and the break-glass accounts are not affected.

### The test fails

Check the discovery address and the secret. If your directory uses a private authority, paste its certificate into the field provided. The page lists the latest attempts and their reason.

### Someone arrives without the right role

The default role applies when the account is created. You can reapply it at each sign-in: your directory then has the final word.

### My team has no directory

Skip this step: the second factor already protects each account.
