Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Microsoft Internal

Microsoft (Internal) OpenID Setup

This guide walks through a basic setup allowing Microsoft users to authenticate with your Kasm deployment.

Reference Docs:

Creating a Microsoft OAuth App

  1. Login to the Microsoft Azure Portal: https://portal.azure.com/

  2. Select Azure Active Directory.

Azure Active Directory

Azure Active Directory
  1. Select App Registrations.

App Registration

App Registration
  1. Select New Registration.

  2. Give the app a Name (e.g Kasm)

  3. In the Supported account types select Accounts in this organizational directory only....

Register App

Register App
  1. On the next page, the Application (client) ID is shown, save this value as the Client ID to be used in the next section.

  2. Select Endpoints. Note the OAuth 2.0 authorization endpoint (v2), OAuth 2.0 token endpoint (v2), and OpenID Connect metadata document values to be used in the next section.

  3. Select Add a certificate or secret next to Client credentials.

Client Credentials

Client Credentials
  1. Select the Client secrets tab, then slick New client secret.

  2. Enter a description and expiration then click Add.

  3. The credentials are shown, save the Value as the Client Secret to be used in the next section.

Client Secret

Client Secret
  1. Select Token configuration.

  2. Select Add groups claim.

  3. Check Security groups, then click Add.

Group Claims

Group Claims
  1. Select Add Optional Claim

  2. Under Token Type select ID, then check the box for sid. Click Add.

:align: center
**SID Claim**

Claims Configured

Claims Configured
  1. Select Authentication

  2. In Front-channel Logout URL, provide the Kasm /api/oidc_frontchannel_logout endpoint as shown. Click Save.

Front-channel Logout URL

Front-channel Logout URL
  1. In another browser tab, navigate to the OpenID Connect metadata document URL value saved from earlier. Find and save off the value for the "issuer" field in the response, to be used in the next section.

Kasm OpenID Config

  1. Log into the Kasm UI as an administrator.

  2. Select Access Management -> Authentication -> OpenID -> Add Config.

  3. Update the form with the following entries, using the Client ID and Client Secret gathered in the previous section.

PropertyValue
EnabledChecked
Display NameContinue with Microsoft
Logo URLhttps://www.microsoft.com/favicon.ico
Auto LoginUnchecked
Hostname<Empty>
DefaultChecked
Client ID<Client ID from Microsoft OAuth App>
Client Secret<Client Secret from Microsoft OAuth App>
Authorization URL<OAuth 2.0 authorization endpoint (v2) value from Microsoft OAuth App>
Token URL<OAuth 2.0 token endpoint (v2) value fom Microsoft OAuth App>
User Info URLhttps://graph.microsoft.com/oidc/userinfo
Scopeopenid email profile
Username Attributeemail
Groups Attributegroups
DebugUnchecked
Redirect URLhttps://<Kasm hostname>/api/oidc_callback
OpenID Connect Issuer<Issuer value from the OpenID Connect metadata document>
Logout with OIDC ProviderChecked
Enable OIDC SLO Frontchannel EndpointChecked

Kasm OIDC Configurations

Kasm OIDC Configurations
  1. Click Save to save the changes.

Microsoft Login Test

  1. Logout of the Kasm to display the login screen. The OpenID configuration should be shown.

Login Screen

Login Screen
  1. Click Continue with Microsoft

  2. The user is redirected to Microsoft for auth.

Microsoft Auth

Microsoft Auth
  1. Upon completion, the user is logged into the Kasm app.

Group Mapping

The previous configurations will instruct the identity provider to send a list of Security Group ID the user belongs to during the OpenID auth workflow. We can configure Kasm Groups with the Security Group IDs from Azure AD so that users are automatically added/removed based on their Azure AD group Membership.

  1. Log into the Kasm UI as an administrator.
  2. Select Access Management -> Groups -> Add Group.
  3. Name the Group Group Test, and define a priority.
  4. Click Save to create the group.

Add Group

Add Group
  1. On the groups screen, using the arrow menu select Edit on the group that was just created.
  2. Navigate to the SSO Group Mappings tab and select Add SSO Mapping.
  3. Select the OpenID IDP that was created above "OpenID - Continue with Microsoft" for the SSO Provider.
  4. Then enter the Azure AD security group ID desired in the Group Attributes field.

Add SSO Group Mapping

Add SSO Group Mapping
  1. Click Submit
  2. Logout, then login via the Microsoft Open ID login with a user that is a member of the specified group.
  3. View the users group membership to ensure they are added to the newly created group.