Learn how to create an OpenID Connect (OIDC) application in Microsoft Azure (Azure AD) to be used when configuring Kandji Passport.
Create the App registration
- Login to portal.azure.com
- From the hamburger menu, click Azure Active Directory
- On the left, select App registrations
- Click New registration
- Enter a name for the new application (such as Kandji Passport)
- In the Supported Account Types section, select Accounts in this organizational directory only (Default Directory only - Single tenant)
- Click Register
- On the Overview page, copy the Application (client) ID to a temporary text document
- While still on the Overview page, click Endpoints
- Copy OpenID Connect metadata document (identity provider URL) to a temporary text document
- On the left, select Authentication
- Set Enable the following mobile and desktop flows to Yes
- Click Save
- On the left, select Token configuration
- Click Add optional claims
- For the Token type, select ID
- For the Claim, select preferred_username
- Click Add
- While still on the Token configuration page, click Add groups claim
- Select All Groups...
- Click Add
Once you complete the token configurations, you will see both optional claims - On the left, select API permissions
- Click Add a permission
- Click Microsoft Graph
- Select Delegated permissions
- Expand OpenId permissions
- Select email
- Select profile
- In the Search permissions field, enter User.Read
- Under Users, select User.Read
- Click Add permissions
- While still on the API permissions page, select Grant admin consent for <your_tenant_name>
- Select Yes
- You should see a notification similar to the one below and you should see a "Granted for <your_tenant_name> ..." message in the Status column next to each permission.
- You should see a notification similar to the one below and you should see a "Granted for <your_tenant_name> ..." message in the Status column next to each permission.
- Continue to the next section
Assign users and groups
- From the hamburger menu, click Azure Active Directory
- Click Enterprise applications
- Find and select the Kandji Passport app that was created earlier
- Click Users and groups
- Click Add user/group
- Select the users or groups that should be assigned to the Kandji Passport app
If you see the message below, this means that the entry-level Azure AD license tier is being used, and you will only be able to add users to the Passport app. - Click Select, then click Assign
- You should then be back on the Users and groups page
- Continue to the next section
Multi-factor Authentication (MFA) Considerations
To use Azure with Passport you will need to turn off Azure MFA using Security Defaults (Azure AD free tier), for all users (Microsoft 365 Business, E3, or E5), or with Azure AD Conditional Access (Azure AD Premium P1+).
If Azure MFA was turned on using the legacy per-user method, it will need to turned off at that level as well so that the user can authenticate successfully using Passport.
Turn off legacy per-user MFA
If per-user MFA was turned on previously, it must be turned off for each user.
- Login to your O365 admin center
- In the left-hand navigation click Users > Active users
- Click Multi-factor authentication
- Find each user that needs Multi-factor authentication turned off and set the status to Disabled
Turn off MFA using Security Defaults
If your organization is using the free tier of Azure Active Directory licensing, you will need to turn off Security Defaults to allow users to authenticate with Passport. This will turn off MFA for the entire organization.
- From the Azure Active Directory module, select Properties
- Select Manage Security Defaults
- Change Enable Security Defaults to No
Exclude Kandji Passport from MFA using Azure AD Conditional Access
Azure AD Conditional Access is included with Azure Active Directory Premium or better.
Be sure to turn off both per-user MFA and Security defaults before you turn on Azure AD Conditional Access policies.
- To configure the redirect URI, select Azure Active Directory
- Click App Registrations
- Select the Kandji Passport application created earlier
- In the left navigation menu, click Authentication
- Click Add a Platform
- Click Web in the Configure Platforms blade
- In the Redirect URIs text field, enter http://localhost
- Click Configure
- From the main menu, click Azure AD Conditional Access
- If Azure AD Conditional Access is not visible in the menu click More services
- Filter for conditional so that Azure AD Conditional Access appears
- Using the cursor, hover over Azure AD Conditional Access
- Click the star(⭐️) in the popup that appears. This will put Azure AD Conditional Access in the main menu bar
- If Azure AD Conditional Access is not visible in the menu click More services
- In the Policies section, select each policy that has MFA as a requirement. You can see which policies have MFA as a requirement within the Grant section of each policy.
- Click the link under Cloud apps or actions
- Click Exclude
- Click the link under Select excluded cloud apps
- Search for the Passport app that needs to be excluded
- Check the box next to the app
- Click Select and then click Save in the bottom-left corner.
- Repeat the same process for all Conditional Access policies that have MFA as a requirement.
With the Azure configuration complete, go to the Kandji web app to configure the Passport library item.
User account provisioning via Passport
If you are using the Specify per identity provider group option in the Passport Library item, use the Azure group ObjectID in the Identity provider group field.
Common Azure errors
AADSTS50076
- Azure Message: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '{resource}' - User needs to perform multi-factor authentication. There could be multiple things requiring multi-factor, e.g. Conditional Access policies, per-user enforcement, requested by client, among others.
- Remediation: Make sure to review the Multi-factor Authentication (MFA) Considerations section in this support article to ensure that Multi-factor Authentication is turned off for the Passport enterprise app in your Azure environment.
AADSTS7000218
- Azure Message: The request body must contain the following parameter: 'client_assertion' or 'client_secret' - Developer error - the app is attempting to sign in without the necessary or correct authentication parameters.
- Remediation: Make sure to have the setting Enable the following mobile and desktop flows set to Yes in Authentication section of the Passport Enterprise App in Azure.
To look up additional Azure error codes you can use this link.