Learn how to create an OpenID Connect (OIDC) application in Microsoft Entra ID to be used when configuring Kandji Passport
Note: Microsoft Entra ID is the new name for Azure AD (Azure Active Directory)
If you experience any issues with Passport & Azure, read through our Passport Troubleshooting with Azure article for more information.
When logging in at the Passport Login Window, the full email address should always be used in the username field to ensure the authentication session is connected to the IdP and not local authentication. To avoid confusion with using email addresses at the FileVault Login Window, ensure that the Managed user visibility box is unchecked on the Login Window Library Item. You can read more about this in our Passport Compatibility article.
- Before you begin
- Create the App registration
- Assign users and groups
- Enable Microsoft Multi-factor Authentication (MFA) (optional)
- Turn on MFA using Security Defaults
- Add a Redirect URI to support multi-factor authentication (MFA)
- Azure Conditional Access Considerations
- User account provisioning via Passport
- Azure Troubleshooting
Before you begin
You will need access to a Microsoft Entra ID admin user account to grant the proper permissions to the Passport app in Azure.
Create the App registration
- Login to portal.azure.com with an Azure admin user account
- 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)
- For now, leave the Redirect URI (optional) section at its default. In order to avoid multiple situational branches in these instructions, there is a separate "Enable multi-factor authentication (MFA) support" of this document. No matter whether you want to enable MFA support or not for Passport, please continue with the next steps in this section.
- Click Register
- Open a secure text document where the values for this OIDC app can be temporarily stored. You will need these details when you configure the Passport Library Item.
- 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 claim
- 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
- Confirm that the OpenId permissions section is expanded. If the OpenID permissions section isn't expanded, click the icon next to the OpenId permissions section to expand it.
- Select email
- Select profile
- In the Search permissions field, enter User.Read
- In the User section, confirm that User.Read is already selected. If User.Read isn't selected, select it.
- 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
By default, when you create a new App registration, the "Assignment required?" attribute is set to "No". However, if your Passport Enterprise app is set to require assignment, you will need to follow these steps to assign users in order to be able to use your Passport app.
- From the hamburger menu, click Azure Active Directory
- Click Enterprise applications
- Find and select the Kandji Passport app that was created earlier
- Click Properties
- Confirm that the Visible to users? setting is set to "No", otherwise users will see it in their portal. The Passport app is only useful as a replacement for the macOS login window.
- Inspect the Assignment required? setting. If it is set to "No", then you can skip the rest of this section. All users in Azure Active Directory will be able to use the Passport app.
- If the Assignment required? setting is set to "Yes", then 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 (not groups) to the Passport app. - Click None Selected
- In the right Users panel, select each user to assign. If the right panel is labeled Users and groups you can select users and groups, not just users.
- Confirm that all your intended users (and groups if your Azure tier allows it) are in the Selected items section.
- Click Select, then click Assign
- You should then be back on the Users and groups page
With this portion of the Azure configuration complete, review the remaining sections of this document for your Microsoft Azure environment, such as for multi-factor authentication (MFA), then go to the Kandji web app to configure the Passport Library Item.
Enable Microsoft Multi-factor Authentication (MFA) (optional)
The first iteration of Passport did not support multi-factor authentication. If your organization turned off support for MFA for Microsoft Entra ID, you should use Microsoft’s documentation to re-enable MFA for Microsoft Entra ID Directory.
To use Passport with Microsoft Entra ID MFA, the requirements vary depending on your Entra ID subscription.
Please review the following subscription details corresponding to your license level:
- Microsoft Entra ID free tier: turn on Microsoft Entra ID MFA; use Security Defaults.
- Microsoft 365 Business, E3, or E5: use Security Defaults; turn on Microsoft Entra ID MFA for all users
- Microsoft Entra ID Premium P1+: turn on MFA with Azure AD Conditional Access
Turn on MFA using Security Defaults
If your organization uses the free tier of Microsoft Entra ID, you will need to turn on Security defaults (according to Microsoft, “If your tenant was created on or after October 22, 2019, security defaults may be enabled in your tenant"). Turning on security defaults turns on MFA for your entire organization.
Although Security defaults will require all users to register for Microsoft Entra ID MFA, users will not be challenged to provide MFA when authenticating to Passport. This is because per-app MFA is not supported in the free-tier of Entra ID. Per-app MFA is a feature of Azure Conditional Access. If it is desirable that MFA is used when authenticating to Passport, legacy per-user MFA must be enabled. Please, note that Microsoft recommends to not use Legacy per-user MFA in favor of Conditional Access. Please review these recommenations before moving forward with per-user MFA.
- From the Azure Active Directory module, select Properties
- In the Access management for Azure resources section, click Manage Security Defaults
- Below Enable security defaults, click Yes
- Click Save
Add a Redirect URI to support multi-factor authentication (MFA)
- If you’re not signed in to Azure already, sign in to portal.azure.com
- Navigate to App Registrations
- Select your Kandji Passport app
- In the left navigation menu, select Authentication
- If the portal doesn’t display Web in the Platform configurations section, then skip to the next step. If the portal does display Web, we recommend that you use Mobile and desktop applications instead. Use the following steps to remove the Web redirect and Web client secret:
- In the upper-right corner of the Web section, click the trash icon to delete
- Near the bottom of the screen, click Save
- Confirm that the Platform configurations section doesn’t display a Web section
- In the left navigation pane, click Certificates & secrets
- If there is a Client secret, then to the right of the secret, click the trash icon to delete it
- In the confirmation pane, click Yes
- Confirm that there are no client secrets displayed
- In the left navigation menu, select Authentication
- In the Platform configurations section, click Add a platform
- Select Mobile and desktop applications
- Select the first checkbox: https://login.microsoftonline.com/common/oauth2/nativeclient
- Hover your pointer to the right of the value of the field from the previous step, then click the copy icon under the Copy to clipboard callout
- Paste the text into your secure document (in your Passport library item, in the Web Login authentication section, you’ll use this value in the “Redirect URI” field)
- Click Configure
- Confirm that the Platform configurations section contains the section Mobile and desktop applications, with the checkbox selected for https://login.microsoftonline.com/common/oauth2/nativeclient
You may have already completed steps 13-32 earlier in this guide. Please verify that steps 13-32 have been completed.
- In the left navigation menu, select Token configuration
- Click Add optional claim
- 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 (includes distribution lists but not groups assigned to the application)
- Click Add
Once you complete the token configurations, Azure displays both optional claims. - In the left navigation menu, select API permissions
- Confirm that the Configured permissions section already displays an entry for Microsoft Graph which is User.Read
- Click Add a permission
- Click Microsoft Graph
- Select Delegated permissions
- If OpenId permissions isn't already expanded, click the arrow to expand OpenId permissions
- Select the checkbox for email
- Select the checkbox for profile
- Click Add permissions
- Select Grant admin consent for <your_tenant_name>
- In the Grant admin consent confirmation, click Yes
- Confirm that Azure displays a notification similar to the one below:
- Confirm that in the Status column next to each permission, Azure displays "Granted for <your_tenant_name>":
- With this portion of the Azure configuration complete, review the remaining sections of this document for your Microsoft Azure environment, such as for Azure conditional access, then go to the Kandji web app to configure the Passport library item.
Microsoft Entra ID Conditional Access Considerations
Microsoft Entra ID Conditional Access is included with Microsoft Entra ID Premium or better. Be sure to turn off both per-user MFA and Security defaults before you turn on Microsoft Entra ID Conditional Access policies.
If Entra ID is configured with a Microsoft Entra ID Conditional Access policy that specifies MFA as a requirement and specifies all or specific cloud apps, you'll need to exclude the Enterprise application that you use for Passport from that policy. Another way to describe such a policy is that the policy uses both of these criteria:
- Assignments: Cloud apps or actions: Cloud apps: All cloud apps or Select apps
- Access controls: Grant: Grant access: Require multifactor authentication
Here's an example of a policy that you don't need to modify, because it doesn't use both of the criteria above (specifically, although it has the grant of Require multifactor authentication, it doesn't have the assignment for Cloud apps or actions of All cloud apps or Select apps):
And here's an example of a policy that you do need to modify to exclude the Enterprise application for Kandji Passport, because the policy uses both criteria:
Although it might seem counterintuitive that you need to exclude the Enterprise application from being required to use MFA, especially since you want Kandji Passport to allow MFA during the Web Login authentication mode. This is because the web view of the Web Login authentication mode does not use the Enterprise application, but the web view (the "Please enter your Microsoft Azure password" screen) does use the Enterprise application–and requires the resource owner password grant (ROPG) flow, and doesn't support MFA. So if you have any policies that require cloud apps to use MFA, simply add the Kandji Passport Enterprise application to the exclusion list.
In order for you to exclude the Enterprise application, it needs to have a Redirect URI value.
Add the cloud app exclusion
For each applicable policy, exclude the Enterprise app you use for Kandji Passport.
- In the upper-left corner, click the hamburger menu, and then click Azure AD Conditional Access
- If Azure AD Conditional Access is not visible in the menu, click More services
- In the Filter services field, enter conditional so that Azure AD Conditional Access appears
- Using the pointer, don't yet click, instead hover over Azure AD Conditional Access
- Click the star(⭐️) in the popup that appears. This adds Azure AD Conditional Access to your main menu bar
- Before you dismiss the popup that appeared, click View. Otherwise, click Conditional Access from your main menu bar
- If Azure AD Conditional Access is not visible in the menu, click More services
- Confirm that the portal displays each policy with a Policy Name and a State (among other information)
- Select a policy that has the State of On
- If the Cloud apps or actions section displays No cloud apps, actions, or authentication contexts selected, then go back to the previous step and select the next policy
Otherwise, click the link under Cloud apps or actions - Click Exclude
- Review the list of excluded cloud apps (there may be no cloud apps excluded). If the Enterprise app for Kandji Passport is already excluded, you can return to step 3 and move on to the next policy
- Click the text link under Select excluded cloud apps
- In the Search field, enter the name of the Enterprise app you use for Kandji Passport. Note that the search doesn't just search for any part of the name; you need to enter at least the start of the name
- From the search results, select the checkbox for your Enterprise app for Kandji Passport
- At the bottom of the Select excluded cloud apps blade, click Select
- Confirm that the Enterprise app was added to the list of excluded apps
- In the lower-left corner of the page, click Save
- Go back to step 3 and repeat for the next policy until you have examined or updated every Conditional Access policy
User account provisioning via Passport
If you use Specify per identity provider group option in the Passport Library Item, use the Entra ID group ObjectID in the Identity provider group field.
- In Microsoft Entra ID, navigate to the group you want to use
- Copy the Object Id for that group
- In the Kandji Passport Library Item, in the User Provisioning section, paste the value from the previous section into the Identity provider group field
- Repeat the previous steps for each additional Entra ID group you want to use
- In the Passport Library Item, click Save
If your Passport app is not showing up as an excludable app, you will need to add a web platform in your app registration. Please follow the steps below.
- Navigate to Azure AD>App Registrations>Your Passport App>Authentication. Select Add a platform
- Select Web
- Add a Redirect URI - https://localhost.redirect
- Select Configure
- Select Save
Microsoft Entra ID Troubleshooting
If you are experiencing issues with Entra ID Passport, please click here to learn more about common troubleshooting steps.