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:
- Azure Subscription
- 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:
- Login to Microsoft Entra admin center (make sure you are in your Azure subscription tenant)
- Go to Identity > Overview > Manage tenants

- Click on Create button > choose External > click on Continue
- 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

- 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

- In the Review + create tab, verify the details entered and click on Create button.

- Make sure you are in the newly created tenant, if not switch to the correct one
- Go to I_dentity_ > Applications > App registrations > click + New registration
- 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

- Once the app is created, go to the application > Manage > Authentication > Select type as ID tokens > click on Save button

- 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


- Go to Token configuration > + Add optional claim > ID > select email, family_name & given_name > click Add


- 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



- Then grant admin consent for offline_access & openid API permissions as shown in the screenshot below

- Finally go to Overview and copy the Client ID and Tenant ID which is needed in your portal configuration to use this authentication method

- Go to Identity > External Identities > User flows > + New user flow

- 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).

- 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

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
- https://learn.microsoft.com/en-us/entra/external-id/external-identities-overview
- https://learn.microsoft.com/en-us/entra/external-id/customers/quickstart-tenant-setup
- https://learn.microsoft.com/en-us/power-pages/security/authentication/entra-external-id?toc=%2Fentra%2Fexternal-id%2Ftoc.json&bc=%2Fentra%2Fexternal-id%2Fbreadcrumb%2Ftoc.json&tabs=external-configuration
Last updated on