Prerequisites
- A Microsoft Azure account
- Your Microsoft OAuth Application (client) ID and Client Secret
Configure Microsoft OAuth
Register an application on Azure
- Go to the Azure Portal
- Navigate to Microsoft Entra ID > App registrations
- Click New registration
- Enter a name (e.g. “Prelude Session”)
- Under Supported account types, select the option that fits your needs (e.g. “Accounts in any organizational directory and personal Microsoft accounts”)
- Click Register
- Copy the Application (client) ID — you will need it in the next step
Set the redirect URI
- In your app registration, go to Manage > Authentication
- Click Add a platform > Web
- Enter the following redirect URI:
${YOUR_CUSTOM_DOMAIN} with your custom domain (e.g. session.yourapp.com).- Click Configure
The redirect URI must match exactly. Make sure there is no trailing slash and that you are using
https.Create a client secret
- In your app registration, go to Certificates & secrets
- Click New client secret
- Enter a description and select an expiration period
- Click Add
- Copy the Value (not the Secret ID) — you will need it in the next step
Create the Microsoft OAuth configuration
| Field | Description |
|---|---|
client_id | Your Microsoft Application (client) ID. |
client_secret | Your Microsoft client secret value. |
enabled | Set to true to enable Microsoft login. |
options.use_email_as_identifier | When true, the user’s Microsoft email is stored as an email identifier. |
options.allow_email_account_merge | When true, if a user with the same email already exists, the Microsoft account is linked to the existing user. |