Configure Intune

The following sections cover how to configure Intune for Device Certificate Enrollment.

Prerequisite: Set up Intune

Before configuring Intune for Device Certificate Enrollment, it is assumed that Intune is set up according to instructions in the Microsoft doc Set up Intune.

Configure Intune for Device Certificate Enrollment

Follow the steps outlined below to configure Intune for Device Certificate Enrollment:

Add a Test User

As an administrator, you can add users that once added can enroll devices and access company resources.

Follow the steps below to add an Intune test user.

  1. Log in to Intune (https://aka.ms/intuneportal).
  2. Select Users, and then click New user.

  3. On the User page, specify the required information and then click Create.

    1. Name: Specify a name. In this example, SCEP User.

    2. User name: The user name of the new user. In this example, scepuser@c2company.com.

Add a Test Group

Use the following steps to create a new group.

  1. Select Groups and then click New group in the All groups pane.
  2. On the New Group page, specify the following and then click Create.
    1. Specify a Group name. In this example, SCEPTEST.
  3. To add members to the group, select Members and click Add Members.
  4. Select the SCEP User and then click Select to add the member.

Assign an Intune License to the User

You must assign each user an Intune license before users can enroll their devices in Intune.

Use the following steps to assign an Intune license to the added user.

  1. Click Users, select the added SCEP User, and then click Licenses.
  2. Click Assign and then on the Assign license page, select Products Configure required settings.
  3. Select the Intune product, click Select and then click Assign.

Authorize Communication between CA and Intune

To allow a third-party SCEP server to run custom challenge validation with Intune, create an app in Azure Active Directory (AD). This app gives delegated rights to Intune to validate SCEP requests. For more information, refer to the Microsoft doc Set up third-party CA integration.

To authorize communication between CA and Intune, create an application in Azure Active Directory, following the steps below.

  1. Log in to the Azure Portal (https://portal.azure.com/).
  2. Select Azure Active Directory > App Registrations, and then click New registration.
  3. On the Register an application page, specify the following:
    1. Enter a Name of the application, for example, SCEP_API_registration.
    2. In Supported account types, select Accounts in any organizational directory.
    3. For Redirect URI, leave the default of Web, and then specify the URI of the Intune EJBCA Connector, in this example https://<fqdn>/intune-ejbc-connector/scep.
  4. Click Register to create the application and to open the Overview page for the new app.
  5. On the app Overview page, take note of the Application (client) ID as you will need this value later.
  6. Select Certificates & secrets under Manage, and click New client secret.
  7. Specify a Description, select any option for Expires, and then click Add to generate a value for the client secret.
  8. Take note of the new client secret value before you leave the page.
  9. Record your Tenant ID. The Tenant ID is the domain text after the @ sign in your account. For example, if your account is admin@name.onmicrosoft.com, then your tenant ID is name.onmicrosoft.com.
  10. Select API permissions under Manage, and then click Add a permission.
  11. On the Request API permissions page, select Intune, and then click Application permissions.
  12. Select the permission scep_challenge_provider (SCEP challenge validation), and click Add permissions to save the configuration.
  13. On the API permissions page under Grant consent, click Grant admin consent for <Tenant name>, and then click Yes in the confirmation panel.

Configure Intune for Windows 10

To configure Intune for Windows 10 Device Enrollment, do the following:

  1. Log in to the Intune portal (https://aka.ms/intuneportal).
  2. Select Device enrollment.
  3. If not already configured, you will be prompted to choose the Mobile Device Management Authority (MDM Authority). For this example, select Intune MDM Authority, and then click Choose.
  4. Select Windows enrollment under Manage, and click AutomaticEnrollment.
  5. On the Configure page, change the MDM user scope to Some, select group sceptest, and then click Save to store the configuration.

Configure Intune Trusted Certificates and SCEP Certificate Profile

The following provides steps to follow to configure the different Intune Trusted Certificates and the SCEP Certificate Profile.

Create Trusted Certificate Profile for EJBCA Root CA

Follow the steps below to create the Trusted Certificate Profile for the EJBCA Root CA:

  1. Select Device configuration, then select Profiles under Manage, and click Create profile.
  2. On the Create profile page, specify the following:
    1. Enter the profile Name: WIN10_RootCA_Cert.
    2. For Platform, specify Windows 10 and later.
    3. For Profile type, select Trusted certificate.
  3. Click Settings:Configure, upload the EJBCA Root Certificate in DER format, select the Destination store=Computer certificate store - Root, and then click OK.
  4. Select Assignments under Manage, and then click Select groups to include.
  5. On the Select groups to include panel, select the sceptest group, click Select, and then click Save.

Create Trusted Certificate Profile for EJBCA Issuing CA

Follow the steps below to create the Trusted Certificate Profile for the EJBCA Issuing CA:

  1. Select Device configuration, then select Profiles under Manage, and click Create profile.
  2. On the Create profile page, specify the following:
    1. Enter the profile Name: WIN10_IssuingCA_Cert.
    2. For Platform, specify Windows 10 and later.
    3. For Profile type, select Trusted certificate.
  3. Click Settings:Configure, upload the EJBCA Issuing CA Certificate in DER format, select the Destination store=Computer certificate store - Intermediate, and then click OK.
  4. Select Assignments under Manage, and then click Select groups to include.
  5. On the Select groups to include panel, select the sceptest group, click Select, and then click Save.

Create Trusted Certificate Profile for EJBCA RootCA in Computer Certificate Intermediate Store

The Intune EJBCA Connector (https://github.com/agerbergt/intune-ejbca-connector) as configured will provide both Root and Issuing CA certs to the SCEP receiver. The certs are added to the Windows 10 computer certificate Trusted Intermediate store. In order for the Root CA to be removed from the Windows 10 computer certificate Trusted Intermediate store when the device is removed from Intune, the following profile will need to be added.

Follow the steps below to create the Trusted Certificate Profile for the EJBCA RootCA in the Computer certificate store - Intermediate:

  1. Select Device configuration, then select Profiles under Manage, and click Create profile.
  2. On the Create profile page, specify the following:
    1. Enter the profile Name: WIN10_RootCA_Cert_Intermediate.
    2. For Platform, specify Windows 10 and later.
    3. For Profile type, select Trusted certificate.
  3. Click Settings:Configure, upload the EJBCA Issuing CA Certificate in DER format, select the Destination store=Computer certificate store - Intermediate, and then click OK.
  4. Select Assignments under Manage, and then click Select groups to include.
  5. On the Select groups to include panel, select the sceptest group, click Select, and then click Save.

Create SCEP Certificate Profile

Follow the steps below to create the SCEP Certificate Profile:

  1. Select Device configuration, then select Profiles under Manage, and click Create profile.
  2. On the Create profile page, specify the following:
    1. Enter the profile Name: WIN10_SCEP_certificate_profile.
    2. For Platform, specify WIndows 10 and later.
    3. For Profiletype, select SCEP Certificate.
  3. Click Settings:Configure, and specify the following:
    1. Certificate type: Device.
    2. Subject name format: CN={{DeviceName}}_{{Device_Serial}}
    3. Certificate validity period: 1 Year.
    4. Key storage provider (KSP): Enroll to Trusted Platform Module (TPM) KSP if present, otherwise Software KSP.
    5. Key usage: Digital signature and Key Encipherment.
    6. Key size: 2048.
    7. Hash algorithm: SHA-2.
    8. Root Certificate: WIN10_RootCA_Cert.
    9. Extended key usage: Select Predefined values=Client Authentication to populate the Name and Object Identifier fields, and then click Add.
    10. SCEP Server URLs: Specify https://<fqdn>/intune-ejbc-connector/scep to be the URI of the Intune EJBCA Connector, and then click Add.
  4. Select Assignments under Manage, and then click Select groups to include.
  5. On the Select groups to include panel, select the sceptest group, click Select, and then click Save.

Next Step: Configure Intune EJBCA Connector Server

Next, configure the Intune EJBCA Connector Server.