SecurityEnterprise SSOAzure AD (OIDC)

Azure AD SSO Setup (OIDC)

This guide walks you through configuring Microsoft Entra ID (formerly Azure Active Directory) as your identity provider for Ledly using OpenID Connect (OIDC).

Azure AD SSO requires an Azure subscription with Azure Active Directory and a Ledly Enterprise plan ($1,999/mo).

Prerequisites

  • Azure Portal access with Application Administrator or Global Administrator role
  • Ledly organization administrator access
  • Ledly Enterprise plan ($1,999/mo)

Configuration Values

You’ll need this Ledly value when configuring Azure AD:

SettingValue
Redirect URIhttps://ledlyv2-production.up.railway.app/api/sso/azure/callback

Step 1: Register Application in Azure

Log in to Azure Portal

Navigate to portal.azure.com and sign in with your administrator account.

  1. In the search bar, type Azure Active Directory (or Microsoft Entra ID)
  2. Click on Azure Active Directory in the results

Go to App registrations

  1. In the left sidebar, click App registrations
  2. Click New registration at the top

Register the application

Fill in the registration form:

FieldValue
NameLedly SSO
Supported account typesSelect based on your needs (typically “Accounts in this organizational directory only”)
Redirect URISelect Web and enter: https://ledlyv2-production.up.railway.app/api/sso/azure/callback

Click Register to create the application.


Step 2: Configure Authentication

Get Application IDs

After registration, you’ll be on the application overview page. Copy these values:

ValueLocationDescription
Application (client) IDOverview pageYour Client ID
Directory (tenant) IDOverview pageYour Tenant ID
⚠️

Save these values securely - you’ll need them to configure Ledly.

Verify Redirect URI

  1. Click Authentication in the left sidebar

  2. Verify the redirect URI is correctly set to:

    https://ledlyv2-production.up.railway.app/api/sso/azure/callback
  3. Under Implicit grant and hybrid flows, ensure these are checked:

    • Access tokens
    • ID tokens
  4. Click Save if you made changes


Step 3: Create Client Secret

  1. In the left sidebar, click Certificates & secrets

Create new client secret

  1. Click New client secret
  2. Enter a description: Ledly SSO Secret
  3. Select an expiration period (recommended: 24 months)
  4. Click Add

Copy the secret value

The secret value is only shown once. Copy it immediately.

FieldWhat to copy
ValueThe secret value (long string) - this is your Client Secret
Secret IDKeep for reference (you may need to identify which secret to rotate)
🚫

Critical: Copy the secret value immediately after creation. It will be hidden after you leave this page and cannot be retrieved - you would need to create a new secret.


Step 4: Configure API Permissions (Optional)

Default permissions are usually sufficient, but verify these are granted:

Check permissions

  1. Click API permissions in the left sidebar
  2. Ensure Microsoft GraphUser.Read is listed

If your organization requires admin consent:

  1. Click Grant admin consent for [Your Organization]
  2. Click Yes to confirm

Step 5: Configure Ledly

Now configure Ledly to use your Azure AD application:

  1. Log in to Ledly at app.ledly.io
  2. Go to SettingsSSO

Select Azure AD

Select Azure AD (OIDC) as your identity provider.

Enter Configuration Values

Enter the values you collected from Azure:

FieldValue
Tenant IDYour Directory (tenant) ID from Azure
Client IDYour Application (client) ID from Azure
Client SecretThe secret value you created

Configure SSO Options

OptionRecommended Setting
Auto-provision usersEnabled - Creates accounts for new SSO users
Default roleMember - New users start with member permissions
Allow password loginYour choice - Enable for fallback access

Save Configuration

Click Save to apply the SSO configuration.


Step 6: Test SSO

Test with an Admin Account First

  1. Open an incognito/private browser window
  2. Navigate to your Ledly login page
  3. Click Sign in with SSO or enter your email
  4. Verify you’re redirected to Microsoft login
  5. Sign in with your Azure AD credentials
  6. If prompted, consent to the permissions requested
  7. Confirm you’re redirected back to Ledly and logged in

Verify User Attributes

After logging in via SSO:

  1. Go to SettingsProfile
  2. Verify your name and email were populated correctly

Test JIT Provisioning (Optional)

  1. Have a user who doesn’t have a Ledly account sign in via SSO
  2. Verify their account was automatically created

Configuration Reference

OIDC Endpoints

Azure AD uses standard OIDC discovery. The endpoints are automatically derived from your Tenant ID:

EndpointURL
Discoveryhttps://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration
Authorizationhttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize
Tokenhttps://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token
UserInfohttps://graph.microsoft.com/oidc/userinfo

Supported Scopes

Ledly requests the following OIDC scopes:

ScopePurpose
openidRequired for OIDC
profileAccess to name claims
emailAccess to email claim

Token Lifetimes

TokenDefault Lifetime
Access token1 hour
Refresh token90 days
ID token1 hour

Conditional Access Policies

Azure AD Conditional Access can be used to enforce additional security:

PolicyDescription
Require MFARequire multi-factor authentication for Ledly access
Trusted locationsOnly allow access from corporate networks
Compliant devicesRequire devices to be enrolled and compliant
Sign-in riskBlock or require MFA for risky sign-ins

Configuring Conditional Access

  1. Go to Azure Active DirectorySecurityConditional Access
  2. Create a new policy
  3. Under Cloud apps or actions, select your Ledly SSO application
  4. Configure your conditions and access controls
  5. Enable the policy

Conditional Access policies are enforced at the Azure AD level and apply to all SSO logins to Ledly.


Troubleshooting

”Invalid Client ID” Error

Possible causes:

  • Client ID was not copied correctly
  • Application was deleted

Solutions:

  1. Verify the Application (client) ID in Azure matches what’s configured in Ledly
  2. Check that the application still exists in Azure AD

”Invalid Client Secret” Error

Possible causes:

  • Secret value was not copied correctly
  • Secret has expired

Solutions:

  1. In Azure, go to Certificates & secrets
  2. Check if the secret has expired
  3. Create a new secret if needed and update Ledly

”Redirect URI Mismatch” Error

Possible causes:

  • Redirect URI doesn’t match exactly

Solution: Verify the redirect URI in Azure AD is exactly:

https://ledlyv2-production.up.railway.app/api/sso/azure/callback

Check for:

  • Trailing slashes
  • HTTP vs HTTPS
  • Typos

”AADSTS50011: The reply URL does not match”

This is the Azure-specific version of redirect URI mismatch:

  1. In Azure Portal, go to your app registration
  2. Click Authentication
  3. Ensure the redirect URI matches exactly
  4. Click Save and wait a few minutes for propagation

”User Not in Directory” Error

Possible causes:

  • User is not a member of your Azure AD tenant
  • Using the wrong account type selection

Solutions:

  1. Verify the user exists in your Azure AD
  2. Check the “Supported account types” setting in your app registration
  3. For guest users, ensure guest access is enabled

Secret Expiration

When your client secret expires:

  1. In Azure, go to Certificates & secrets
  2. Click New client secret
  3. Copy the new secret value
  4. Update the secret in Ledly SettingsSSO
  5. Delete the old secret in Azure
⚠️

Set a calendar reminder for secret expiration. Secrets expire silently and will break SSO when they do.


Revoking SSO Access

Remove User Access

To remove a specific user’s access to Ledly:

  1. Use Conditional Access to block the user, or
  2. Remove the user from Azure AD entirely

Disable SSO Integration

To disable SSO for your entire organization:

In Ledly:

  1. Go to SettingsSSO
  2. Toggle off the SSO configuration or select “None” as provider

In Azure (optional):

  1. Go to your Ledly app registration
  2. Click Delete to remove the application entirely

Support

If you need help with Azure AD SSO setup:

When contacting support, include:

  • Your Ledly organization ID
  • Your Azure tenant ID (not the client secret)
  • Any error messages displayed
  • Screenshots of your Azure configuration (redact secrets)