Skip to content

Microsoft Entra ID SSO

This guide covers how to configure Single Sign-On (SSO) using Microsoft Entra ID (formerly Azure AD) for your Mainbranch workspace.

Microsoft Entra ID SSO enables your users to sign in to Mainbranch using their Microsoft 365 accounts. This provides:

  • Seamless sign-in experience
  • Centralized authentication
  • Automatic access management
  • Support for Microsoft’s MFA policies

Before configuring SSO:

  • Admin access to Mainbranch
  • Microsoft 365 admin or Azure admin access
  • Access to Azure Portal
  1. Create App Registration in Azure

    Register an application in Microsoft Entra ID for Mainbranch.

  2. Configure Redirect URI

    Add the Mainbranch redirect URI to your app registration.

  3. Create Client Secret

    Generate a client secret for authentication.

  4. Enter Credentials in Mainbranch

    Go to Workspace settings > Setup > Authentication and enter:

    • Application (Client) ID
    • Client Secret
    • Directory (Tenant) ID
  5. Test the Connection

    Test SSO by signing out and signing back in with Microsoft.

  1. Sign in to Azure Portal
  2. Navigate to Microsoft Entra ID > App registrations
  3. Click New registration
  4. Enter application name (e.g., “Mainbranch SSO”)
  5. Select supported account types (typically single tenant)
  6. Add the Mainbranch redirect URI as a Web platform
  7. Click Register
  1. In your app registration, go to Certificates & secrets
  2. Click New client secret
  3. Add a description and select expiration
  4. Click Add
  5. Copy the secret value immediately (it won’t be shown again)

The app requires these Microsoft Graph permissions:

  • openid — Basic authentication
  • email — User email address
  • profile — User profile information

Grant admin consent for these permissions.

For organizations with one Microsoft tenant:

  1. Enter your Tenant ID
  2. Only users from this tenant can sign in

Control who can access Mainbranch:

  • Use Azure AD group restrictions
  • Configure conditional access policies
  • Require Mainbranch invitations if needed

Client secrets should be rotated periodically.

  1. Create a new secret in Azure
  2. Update the secret in Mainbranch
  3. Test sign-in works
  4. Delete the old secret in Azure

With SSO configured:

  • Users signing in for the first time are automatically added
  • No manual invitation required
  • Users receive default member role

Limit access using:

  • Azure AD group assignments
  • Conditional access policies
  • Mainbranch invitation requirements

To update SSO settings:

  1. Go to authentication settings in Mainbranch
  2. Update credentials or settings
  3. Save changes
  4. Test with a sign-in

To disable Microsoft SSO:

  1. Go to authentication settings
  2. Disable Microsoft SSO
  3. Ensure alternative authentication is available
  • Use minimum required permissions
  • Enable Azure AD security features
  • Monitor sign-in logs
  • Rotate secrets regularly

Microsoft MFA is fully supported:

  • Users with MFA complete it during sign-in
  • Mainbranch respects your MFA policies
  • Conditional access policies apply

Azure AD conditional access works with Mainbranch:

  • Location-based restrictions
  • Device compliance requirements
  • Risk-based authentication
  • Verify Application ID is correct
  • Check that client secret is valid
  • Ensure the app registration exists
  • Verify URI matches exactly in Azure
  • Check for correct protocol (HTTPS)
  • Ensure no trailing slashes unless configured
  • Verify Tenant ID is correct
  • Check user is in the correct tenant
  • Review tenant restrictions
  • Verify app has required permissions
  • Check admin consent was granted
  • Review Azure AD sign-in logs
  • Document your app registration
  • Use clear naming for the app
  • Test with non-admin account first
  • Set reminders for secret rotation
  • Review permissions periodically
  • Monitor Azure sign-in logs
  • Enable Azure AD security defaults
  • Use conditional access appropriately
  • Don’t share credentials