Sitefinity AzureAD Integration with OpenID Connect

sitefinity | 2021-01-20

Enable seamless SSO (Single Sign-On) with Microsoft Azure AD using OpenID Connect in your Sitefinity instance.

☁️ Azure AD Setup

  1. Go to Azure Active DirectoryApp registrationsNew registration.
  2. Enter a name for your application (you can skip Redirect URI for now), then click Register.
  3. Navigate to the Authentication tab → Add a platform → choose Web.
  4. Under Redirect URIs, enter: http://<your-sitefinity-instance>/Sitefinity/Authenticate/OpenID/signin-custom
  5. Enable ID tokens under “Authorization endpoint”.

🏗️ Sitefinity Setup

  1. Start or run your Sitefinity instance.
  2. Go to the backend → AdministrationAdvanced
    AuthenticationSecurityTokenService
    AuthenticationProvidersOpenIDConnect.
  3. Apply the following configuration:
SettingKey
ClientIDAzure AD App – Application (client) ID
Response typeid_token
Allowed scopesopenid profile email
Authorityhttps://login.microsoftonline.com/[Azure AD App Directory (tenant) ID]/v2.0/authorize
Metadata addresshttps://login.microsoftonline.com/[Azure AD App Directory (tenant) ID]/v2.0/.well-known/openid-configuration
Redirect URIhttps://[Sitefinity Instance]/Sitefinity/Authenticate/OpenID/signin-custom
Post logout redirect URIhttps://[Sitefinity Instance]
TitleAzure AD Login
EnabledTrue
Auto assigned rolesAdministrators
Require email claim from this providerTrue (We can check the metadata address to understand what to map)
Claims to fields mappingsEmail: email, SitefinityProfile.FirstName: name, SitefinityProfile.Nickname: nickname


  1. Restart your Sitefinity instance.

✅ Verification Steps

  1. Visit:
    https://<your-sitefinity-instance>/Sitefinity → Click Azure Login
    screen1

  2. Accept the permissions prompt (shown on first login).
    screen2

  3. Enter your Azure AD credentials — you’ll be redirected back to the dashboard.
    screen3
    screen4

  4. Check under Administration → Users – you’ll notice both a default and an Azure-created user with the same email.
    screen5

🎉 It’s working!


🔧 Optional Enhancements

  • Handle Claims / Provisioning: Intercept Azure AD callback to auto-create and map user profiles.
  • Hide default login:
  1. Create /Content/Pages/login.html
  2. Comment out unnecessary blocks (see example: login.html)
  3. Restart Sitefinity
  4. Optionally add a script to auto-redirect to Azure login on page load

screen6

📚 References