# Sign in with Microsoft

> Let your people sign in with their Microsoft 365 work account (Microsoft Entra ID).

URL: https://docs.racktrace.io/administration/microsoft-sign-in

With Microsoft sign-in, your people use their work account and Microsoft checks the password and the second step.

## Setting it up

Your people sign in with their work account (Microsoft Entra ID, the accounts of Microsoft 365). Microsoft checks the password and the second step (MFA, Conditional Access); whoever leaves your organisation in Microsoft has no more access here. Set it up in the card **Sign in with Microsoft** under **Administration → Login & security**.

1. In the Microsoft Entra admin center, go to **App registrations** → **New registration**. Name it (e.g. RackTrace), choose *Accounts in this organizational directory only*, and add a redirect URI of type **Web** with the **Redirect URI (Web)** shown in the card in RackTrace (**Copy** copies it).
2. From the **Overview**, copy the **Application (client) ID** and the **Directory (tenant) ID** into the card.
3. Under **Certificates & secrets**, create a new client secret and paste its **Value** (not the Secret ID) in **Client secret**. Note when it expires and enter a new one before then.
4. Tick **Show “Sign in with Microsoft” on the login page**. Optionally tick **Required — only administrators can sign in without Microsoft** and **Create an account at the first Microsoft sign-in** (with the **Role of new accounts**: viewer or editor; they get no tenants until you grant them).
5. Click **Save**.

An account is found by its Microsoft sign-in name (UPN, usually the work e-mail address), which must be the e-mail address it signs in with here. Optionally, in Entra under *Enterprise applications → RackTrace → Properties*, set *Assignment required* to Yes and assign the people or groups who may use RackTrace. When Microsoft reports a problem, such as an expired secret or a wrong redirect URI, the card shows it as **Last problem**.

> **Note**
>
> With **Required** on, administrators keep their password (with two-step verification) as the way in when Microsoft is not available. Open password sessions of other users end when you save, and so do those of an administrator you later make an editor or viewer. Switching Microsoft sign-in off, or changing the directory or application ID, ends every session that was started with Microsoft.
