Klevr Product Documentation logo

SSO Using Microsoft Entra External ID

Klevr Portal supports Microsoft Entra External ID authentication in the user-facing front end.

Feature Overview

Klevr Portal supports Microsoft Entra External ID authentication in the user-facing front end. This feature provides an option to the organizations who wants to use any supported external identity to securely access Klevr Portal seamlessly and continue to use their existing authentication mechanism to login to Klevr Portal.

Dependencies

The following are dependencies for this feature:

  1. Azure Subscription
  2. Permission required to create an Entra ID Tenant

Design Details

In order to utilize Microsoft Entra External ID, the following steps are to be followed.

Azure configuration setup:

1
Create an Entra External ID tenant
  1. Login to Microsoft Entra admin center (make sure you are in your Azure subscription tenant)
  2. Go to Identity > Overview > Manage tenants

Design Details (1)

Design Details (1)
  1. Click on Create button > choose External > click on Continue
  2. In the Basics tab, enter the required details like Tenant Name & Domain Name, choose a Country/Region for your tenant & go to the next tab

Design Details (2)

Design Details (2)
  1. In Add a subscription tab, choose your Subscription and a Resource Group in it (if you don't have a resource group, choose the Create new option to create one) & go to the next tab

Design Details (3)

Design Details (3)
  1. In the Review + create tab, verify the details entered and click on Create button.

Design Details (4)

Design Details (4)
2
Configure App Registration
  1. Make sure you are in the newly created tenant, if not switch to the correct one
  2. Go to I_dentity_ > Applications > App registrations > click + New registration
  3. Enter a Name, choose Single tenant as the option for Supported account types, enter a Redirect URI of type Web whose value should be in the format - https://<application-base-url>/klevr/externalauth/entraexternalid/site/ & click Register button

Design Details (5)

Design Details (5)
  1. Once the app is created, go to the application > Manage > Authentication > Select type as ID tokens > click on Save button

Design Details (6)

Design Details (6)
  1. Then go to Certificates & secrets > Client secrets > + New client secret > enter Description > choose Expiry > click Add button. Make sure to copy the client secret as soon as it's created as it won't be visible or copyable after you move away from the screen

Design Details (7)

Design Details (7)

Design Details (8)

Design Details (8)
  1. Go to Token configuration > + Add optional claim > ID > select email, family_name & given_name > click Add

Design Details (9)

Design Details (9)

Design Details (10)

Design Details (10)
  1. Go to API permissions > + Add a permission > APIs my organization uses > Microsoft Graph > Delegated permissions > OpenId permissions > select email, offline_access, openid & profile > click on Add permissions

Design Details (11)

Design Details (11)

Design Details (12)

Design Details (12)

Design Details (13)

Design Details (13)
  1. Then grant admin consent for offline_access & openid API permissions as shown in the screenshot below

Design Details (14)

Design Details (14)
  1. Finally go to Overview and copy the Client ID and Tenant ID which is needed in your portal configuration to use this authentication method

Design Details (15)

Design Details (15)
3
Configure User Flow
  1. Go to Identity > External Identities > User flows > + New user flow

Design Details (16)

Design Details (16)
  1. Give it a Name, select the Identity providers (in this case I'm using the default Entra email and password available in this tenant) and select Given Name, Surname, Display Name (these are the information collected when a user signs up) > click Create.

You can configure additional identity providers in Identity > External Identities > All identity providers. Once configured, it will become available for you to choose when creating a User flow (like you can see Google in the screenshot below).

Design Details (17)

Design Details (17)
  1. Go to the user flow that you created in the previous step > Applications > + Add application > under All select the application that you registered in step 2 > click Select

Design Details (18)

Design Details (18)
4
Application configuration deployment

Make sure to include the below configuration values when you deploy the Klevr Portal to configure Entra External ID authentication. To do the same, update the pipeline library variable group to include the following:

  • Klevr.AllowFrontendEntraExternalIdLogin= true
  • Klevr.EntraExternalIdProvider= <Name you want to display on the login button for this identity provider in you login page>
  • EntraExternalId.Authority = <Identity server authority>
  • EntraExternalId.TenantId= <Tenant ID copied from your app registration overview page>
  • EntraExternalId.ClientId = <Client ID copied from your app registration overview page>
  • EntraExternalId.ClientSecret = <The client secret you created in your app registration>
  • EntraExternalId.ClientCertificates= <Certificate details if you are not using client secret>
  • EntraExternalId.CallbackPath = <Relative call back path which handles authentication response (In this case value should be '/klevr/externalauth/entraexternalid/site/' as we have entered 'https://<application-base-url>/klevr/externalauth/entraexternalid/site/' in app registrations redirect URI)>
  • EntraExternalId.SignedOutCallbackPath = <Relative post sign-out callback path (ex: /klevr/externalauth/signout/)>

One of either ClientSecret or ClientCertificates is mandatory.

📎 References

Last updated on