Skip to content

Integrate a SCEP server with Microsoft Intune

You can use a SCEP server with Microsoft Intune so that Intune-managed devices get their certificates from Certificate Manager - SaaS. With Intune authentication, Intune issues the challenge for each device, and Certificate Manager - SaaS checks every request with Intune before it issues the certificate. You don't distribute a challenge password or an MDM credential.

How it works

  1. Intune sends a SCEP certificate profile to each managed device. The profile contains the SCEP Server URL and a challenge that Intune generated for that device.
  2. The device generates its key pair and submits a certificate signing request (CSR) with the challenge to the SCEP server.
  3. Certificate Manager - SaaS uses your Azure Cloud Provider's Microsoft Entra application to ask Intune whether the request is valid.
  4. If Intune accepts the request, Certificate Manager - SaaS issues the certificate by using the server's end-entity request policy.
  5. Certificate Manager - SaaS reports the outcome to Intune, whether or not the certificate was issued. After Intune accepts the report, Certificate Manager - SaaS returns the issued certificate to the device.

Before you begin

You need the following:

  • The System Administrator or PKI Administrator role in Certificate Manager - SaaS.
  • Microsoft Intune set up in your Azure tenant, and permission to create configuration profiles in Intune.
  • An Azure Cloud Provider in Certificate Manager - SaaS that has validated successfully. Its Microsoft Entra application must have the permissions in Step 1. To create the application and the cloud provider, follow these steps in Configure Azure Key Vault connection:

    • Step 1: Create an Azure App Registration (Service Principal)
    • Step 3: Create a Cloud Provider
    • Step 4: Validate the Connection

    If you create a cloud provider only for Intune, grant the permissions in Step 1 before you validate it.

    Note

    Validating a cloud provider checks that its application has either the Azure Key Vault discovery and provisioning permissions or the Intune permissions. A validated cloud provider doesn't confirm that the Intune permissions are granted, so complete Step 1 even if the cloud provider is already validated.

  • Three request policies for the server, as described in SCEP request policy requirements. The end-entity request policy must also accept the Intune device identifier. See Allow the Intune device identifier.

  • The root certificate of the certificate authority that issues the certificates, for the Intune trusted certificate profile.

Allow the Intune device identifier

For iOS/iPadOS, macOS, and Windows devices, Intune adds a URI subject alternative name (SAN) to each request that identifies the device or user in Microsoft Entra ID, in the form tag:microsoft.com,2022-09-14:sid:<value>. Microsoft requires this identifier for strong certificate mapping. If the end-entity request policy doesn't accept the URI SAN, enrollment fails for these devices. Android devices don't send it.

In the end-entity request policy, select Show Advanced SAN options, and enter a regular expression for URI (SAN) that matches the identifier, such as tag:microsoft\.com,2022-09-14:sid:.*. If you also enroll Android devices, add ^$ as a second value so requests without the identifier are accepted. For how regular expressions work in request policies, see Advanced rule settings using regular expressions.

Step 1: Grant the Entra application the Intune permissions

Certificate Manager - SaaS uses the Microsoft Entra application of your Azure Cloud Provider to validate requests with Intune. The application needs two application permissions, both with admin consent:

Permission API Why Certificate Manager - SaaS needs it
scep_challenge_provider Microsoft Intune API To validate each device's request with Intune
Application.Read.All Microsoft Graph To find your tenant's Intune SCEP validation service

An application set up for Azure Key Vault doesn't have these permissions, even though it's already connected to Certificate Manager - SaaS.

To grant the permissions, you need an Entra role that can grant tenant-wide admin consent, such as Global Administrator.

  1. In the Microsoft Entra admin center, go to App registrations, and open the application whose Application (client) ID matches your Azure Cloud Provider.
  2. Select API permissions > Add a permission.
  3. Select APIs my organization uses, search for and select Microsoft Intune API, select Application permissions, select scep_challenge_provider, and then select Add permissions.
  4. Select Add a permission > Microsoft Graph > Application permissions, select Application.Read.All, and then select Add permissions.
  5. Select Grant admin consent for your tenant, and confirm.

Note

scep_challenge_provider belongs to the Microsoft Intune API, not to Microsoft Graph.

Step 2: Create the SCEP server

Create the server as described in Configure a SCEP server, with these choices:

  1. For Authentication Type, select Intune.
  2. For Azure Cloud Provider, select the cloud provider from Step 1. A cloud provider that hasn't validated is listed as Not validated and can't be used. Validate it on the cloud provider, and then return to this step.
  3. Select Create. Certificate Manager - SaaS checks that it can reach Intune through the cloud provider before it saves the server. If the check fails, the server isn't created and an error message tells you what to fix. See Troubleshooting.
  4. On the review step, copy the SCEP Server URL. If Download Root Certificate is available, download it for Step 3. Then select Done.

Step 3: Configure Intune

Create two kinds of profiles in the Microsoft Intune admin center for each device platform you support. For the full procedures and every profile setting, see Microsoft's documentation on using SCEP certificate profiles with Intune and trusted root certificate profiles.

  1. Create a trusted certificate profile that contains the root certificate of the issuing certificate authority. Intune needs the root certificate on its own, in a file with a .cer extension. If you downloaded a root certificate file in Step 2, you can upload it as is. Otherwise, export the root CA certificate from your certificate authority as a .cer file.

    Intune delivers the root certificate to devices through this profile, so you don't install it on devices yourself.

  2. Create a SCEP certificate profile:

    • For SCEP Server URLs, enter the SCEP Server URL from Step 2, unchanged.
    • For Root Certificate, select the trusted certificate profile from step 1.
    • Set the subject name format, subject alternative names, key size, key usage, extended key usage, and validity period to values that the server's end-entity request policy allows. If a value is outside what the request policy allows, enrollment fails.

      If the end-entity request policy uses an AD CS CA, its Key Usage and Extended Key Usage must include the values the profile requests. If the profile adds a user principal name (UPN) SAN, enable UPN (SAN) in the request policy. See Creating a request policy.

  3. Assign both profiles to the same groups of users or devices.

Step 4: Check that devices enroll

  1. Wait for Intune to deliver the profiles to a device, or sync the device from Intune.
  2. In Certificate Manager - SaaS, check the server's Certificates Issued count in the SCEP Servers list. The count increases when a device enrolls. If it doesn't, see Troubleshooting.
  3. To view the issued certificate, open the certificate inventory and filter by the SCEP issuance origin. See Manage SCEP certificates.

Intune's certificate reports can take a while to show a newly issued certificate, even after the device has it.

Keep the integration working

  • Client secret expiry. Microsoft Entra client secrets expire (after at most 24 months) and don't rotate automatically. When the Azure Cloud Provider's secret expires, Intune enrollments fail. Create a new secret in Entra and update the cloud provider before the old one expires. The server's details panel shows the cloud provider's name under Azure Cloud Provider. To update it, go to Configurations > Integrations > Cloud Providers, and open the cloud provider with that name.
  • Permissions. If someone removes either permission or revokes admin consent, Intune enrollments fail until the permission is granted again. The Provider status in the server's details panel comes from the cloud provider's most recent validation, and Certificate Manager - SaaS doesn't recheck it. If enrollments start to fail, check the permissions on the cloud provider's Microsoft Entra application, even if the panel shows Validated.
  • Renewal. SCEP certificates aren't renewed. To replace a certificate before it expires, the device enrolls again with a new challenge from Intune. See Renewing SCEP certificates.

Troubleshooting

Creating or saving the server fails with an error about the Azure cloud connection or Intune.

Certificate Manager - SaaS checks the cloud provider when you create an Intune server or change its Azure Cloud Provider. If the check fails, the message tells you what to fix:

Message What to do
The Azure cloud connection is missing permissions Intune requires: permissions. Grant admin consent for them in Azure, then save the SCEP server again. Add the listed permissions and grant admin consent, as in Step 1.
The Azure cloud connection is missing permissions Intune requires. Grant admin consent for them in Azure, then save the SCEP server again. Add both permissions and grant admin consent, as in Step 1.
The Azure cloud connection's credentials are missing or were rejected by Azure. Check the application ID, tenant and client secret on the connection, then save the SCEP server again. Check the Azure Cloud Provider. The client secret may have expired.
Intune is not enabled in the Azure tenant. Enable Intune for this tenant, then save the SCEP server again. Set up Microsoft Intune for the tenant, or select a cloud provider for the tenant that uses Intune.
The Azure tenant has no Intune SCEP validation endpoint. Check that Intune is set up for this tenant, then save the SCEP server again. Check that Intune is fully set up for the tenant.
The cloud connection was not found, or is not an Azure connection. Select an Azure Cloud Provider that exists.
Intune access could not be checked right now, so the SCEP server was not saved. Try again in a few minutes. A temporary problem. Try again.

Devices on iOS/iPadOS, macOS, or Windows fail to enroll, but Android devices enroll.

Enrollment fails for every device, and the Enrollment Failures count is increasing.

  • Check that the SCEP certificate profile's settings fit the end-entity request policy: subject name, subject alternative names, key size, key usage, extended key usage, and validity period.

Enrollment fails for every device, but the Enrollment Failures count isn't increasing.

  • Check that the Azure Cloud Provider's client secret hasn't expired, and that both permissions still have admin consent.
  • Check that the server is active and its Status is Ready. See Server status.

The server's details panel shows Cloud provider not found.

  • The Azure Cloud Provider the server uses no longer exists. Select an existing Azure Cloud Provider for the server. See Edit a SCEP server.