Organizations & SSO¶
Organizations¶
Organizations group related tenants together and provide shared SSO configuration. For example, a company with separate Milestone instances for different departments can share a single Microsoft Entra ID setup.
Creating an Organization¶
- Go to the Organizations tab in the admin portal
- Click Create Organization
- Enter the organization name and admin email
- Click Create
Assigning Tenants¶
After creating an organization, assign tenants to it:
- Edit the organization
- Select tenants from the dropdown
- Save changes
Tenants inherit the organization's SSO configuration automatically.
Microsoft Entra ID (SSO)¶
Milestone supports enterprise SSO through Microsoft Entra ID (formerly Azure AD).
Prerequisites¶
- An Azure AD tenant
- An App Registration in Azure AD
- A client secret for the App Registration
- The redirect URI configured in Azure AD
Azure AD App Registration¶
- Go to Azure Portal > Azure Active Directory > App Registrations
- Click New Registration
- Set the redirect URI to:
https://your-domain.com/t/{slug}/api/auth/callback - Under Certificates & secrets, create a new client secret
- Note the Application (client) ID, Directory (tenant) ID, and the client secret value
Configuring SSO in Milestone¶
Per-Organization (Multi-Tenant):
- In the admin portal, go to the Organizations tab
- Click the SSO configure button on the organization
- Enter:
- Client ID — Application (client) ID from Azure
- Tenant ID — Directory (tenant) ID from Azure
- Client Secret — The secret value
- Save configuration
All tenants in the organization will share this SSO setup.
Per-Instance (Single-Tenant):
Configure SSO in the Settings modal within the application, or set environment variables:
SSO_ENABLED=true
SSO_CLIENT_ID=your-azure-app-client-id
SSO_CLIENT_SECRET=your-azure-app-client-secret
SSO_TENANT_ID=your-azure-tenant-id
SSO_REDIRECT_URI=https://your-domain.com/api/auth/callback
SSO Login Flow¶
- User clicks Sign in with Microsoft on the login screen
- Redirected to Microsoft's login page
- After authentication, redirected back to Milestone with an authorization code
- Milestone exchanges the code for tokens and creates/updates the user session
- If the user doesn't exist in Milestone, their account is automatically created
Testing SSO¶
Use the Test Connection button in the SSO configuration modal to verify the setup works before rolling it out to users.