Skip to main content
The Ops Playbook

Install the Configuration Manager Client During Windows Autopilot With Intune Co-Management Settings

Install the Windows Configuration Manager client during Autopilot with an Intune co-management settings policy, with ESP checks for 0x800705b4 and a rollback.

KBY Technologies11 min readTier L115 min
Install the Configuration Manager Client During Windows Autopilot With Intune Co-Management Settings

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.

To get the Configuration Manager client onto new Windows devices during Windows Autopilot, create a co-management settings policy in Intune (Devices > Enroll devices > Windows enrollment > Co-management settings > Create), set Automatically install the Configuration Manager client to Yes, paste the ccmsetup command line from the Configuration Manager console, and assign the policy to the same device group as your Autopilot deployment profile and an enrollment status page (ESP) profile. The enrollment status page then waits while the device downloads CCMSetup.msi from Intune, pulls the client content from your cloud management gateway (CMG), registers with the site and applies co-management policy. Microsoft calls this Windows Autopilot into co-management. The deciding constraint: it supports only Microsoft Entra joined devices in the user-driven scenario, on Configuration Manager 2111 or later with a CMG. Hybrid join, pre-provisioning and Autopilot device preparation policies aren’t supported.

#How client installs are handled today on Autopilot devices

Before this policy existed, getting an Autopilot device to co-management meant packaging ccmsetup as a Win32 app in Intune and deploying it during provisioning. Microsoft’s own description of that approach is blunt: installing the client as a Win32 app introduces component timing and policy delays. The client has to install, find its site and register before it learns which co-management workloads it owns. If the ESP finishes first, the user can reach a desktop before Software Center has anything to offer and while workload authority is still settling.

There is a second, quieter problem on Windows 11. If a device isn’t targeted with a co-management settings policy, the management authority is set to Microsoft Intune during Autopilot. Installing the client as a Win32 app doesn’t change that, so Intune keeps managing every co-management workload even though the client is installed.

The result is rework: rebuilds when the client install races the ESP, and devices whose real workload authority nobody can state with confidence.

#The better way is to let the co-management policy install the client

The co-management settings policy replaces the Win32 app. Intune installs the client as a first-party app, so you no longer create, package or update client content in Intune. You still supply the command-line parameters. On the device, the sequence runs like this:

  1. When the device enrolls in Intune, the service checks whether a co-management settings policy is assigned to it.
  2. In the Device preparation phase of the ESP, the service registers Configuration Manager as a policy provider and sets the management authority from the policy. If the authority is Configuration Manager, the service doesn’t apply Intune policies and waits for policy from Configuration Manager to decide the workload configuration.
  3. With automatic install on, the device downloads CCMSetup.msi from Intune and runs it with your command line. That command line points at the CMG, which serves the site’s production client version. The ESP sits on Preparing your device for mobile management while this happens.
  4. The client registers with the site through the CMG and requests policy.
  5. In the Device setup phase, if the command line includes PROVISIONTS, the client runs that task sequence. The ESP tracks it in the Apps category and it may restart the device and return to the ESP.

There is no integration in the Account setup phase. The trade-off is time: the ESP now waits for a full client install and registration, plus any task sequence, inside its timeout, which defaults to 60 minutes.

Rendering diagram...

Compared with the Win32 app, the ESP now holds the user until the client is registered, so the first desktop already has a working client, and the task sequence gives you apps installed in a fixed order.

#Setting it up in Configuration Manager and Intune

Check the prerequisites first, and stop if any is missing. You need Configuration Manager 2111 or later with a CMG and co-management enabled; devices on Windows 11 or a supported Windows 10 version, registered for Autopilot; and a user-driven, Microsoft Entra join deployment profile. Clients must not depend on PKI client authentication certificates, because the certificate can’t be provisioned before the client needs to authenticate to the CMG. Microsoft recommends Microsoft Entra ID for client authentication. Devices must also trust the CMG server authentication certificate.

  1. Copy the command line. In the Configuration Manager console, go to Administration > Cloud Services > Cloud Attach (the Co-management node on 2103 and earlier), select the co-management object, choose Properties and open the Enablement tab. The command line only appears once every prerequisite, including the CMG, is met. If it isn’t shown, stop and fix that first. Microsoft’s example looks like this:
    1CCMSETUPCMD="CCMHOSTNAME=contoso.cloudapp.net/CCM_Proxy_MutualAuth/72186325152220500 SMSSITECODE=ABC"
  2. Decide the extra properties. CCMHOSTNAME and SMSSITECODE are required in every case. Add SMSMP if devices roam back to the intranet, UPGRADETOLATEST if new devices should take the pre-production client version straight away, and PROVISIONTS with a task sequence deployment ID if you want the ordered-install step. Keep the whole line to 1,024 characters or fewer: longer than that, the client installation fails.
  3. Prepare the task sequence, if you use one. Create a non-OS deployment task sequence and deploy it to the built-in All Provisioning Devices collection; note the deployment ID, for example PRI20001. It runs with the Default Client Settings, because the device isn’t yet in any collection with custom settings, so you may need to turn on the Cloud Services settings Enable clients to use a cloud management gateway and Allow access to cloud distribution point there. Keep it to the apps the user needs on day one.
  4. Create the policy. In the Intune admin center go to Devices > Enroll devices > Windows enrollment > Co-management settings > Create. Name it, set Automatically install the Configuration Manager client to Yes, and paste the command line. Leave the Advanced setting Override co-management policy and use Intune for all workloads at No unless you want Intune to own every workload and keep the client only for apps.
  5. Assign it to a pilot device group. The same group needs the Autopilot deployment profile and an ESP profile with Show app and profile configuration progress set to Yes. The pages on routing Autopilot profiles with group tags and dynamic device groups and configuring the ESP to block desktop use until required apps install cover both. If more than one co-management policy can reach a device, Intune pre-computes which one it serves; set each policy’s priority in the Co-management authority pane.
  6. Provision one pilot device. Expected evidence: the ESP pauses on Preparing your device for mobile management, then, if you used PROVISIONTS, shows the task sequence under Apps in Device setup, and the client registers with the site. The next section shows how to confirm both.
Steel framework cabinets housing servers networking devices and cables in contemporary equipped data center
Photo by Brett Sayles on Pexels

#Who can change the policy, and the limits that matter

Protect the Advanced override. Microsoft warns not to change it after provisioning: it applies to existing devices in the assigned group, not only new ones, and because of policy synchronisation timing the result is non-deterministic. Decide it once per policy and limit who can edit enrollment settings to the people who own that decision.

Don’t mix providers: use either the co-management policy’s Configuration Manager provider or the Intune management extension provider, not both, because neither is aware of the other. If install order matters, put the apps in the task sequence.

Avoid Pilot Intune workloads for these devices. Pilot collections depend on collection evaluation, which can’t happen until the client has registered, so the device gets the right policy late and behaviour is unpredictable. Set each workload to Configuration Manager or Intune on the Workloads tab before the pilot, and only switch a workload once the matching policy is configured and deployed in Intune.

#Verify each pilot device before adding more

On each pilot device, confirm the ESP recorded the client install as complete. This read-only query returns the provider’s state:

1$key = 'HKLM:\SOFTWARE\Microsoft\Windows\Autopilot\EnrollmentStatusTracking\Device\DevicePreparation\PolicyProviders\ConfigMgr'
2Get-ItemPropertyValue -Path $key -Name InstallationState

The values are 1 (not installed), 2 (not required), 3 (complete) and 4 (error). You want 3. If you used a task sequence, check its tracking key too, where 3 also means complete and 2 means in progress:

1$key = 'HKLM:\SOFTWARE\Microsoft\Windows\Autopilot\EnrollmentStatusTracking\Device\Setup\Apps\Tracking\ConfigMgr\Provisioning_TS'
2Get-ItemPropertyValue -Path $key -Name InstallationState

Then check from the server side. On the site server, the SMS_Client_ComanagementState WMI class in the ROOT\SMS\site_<SITECODE> namespace has a row per client: the device is co-managed when MDMEnrolled and ComgmtPolicyPresent are both 1. Finally, sign in and check Software Center shows the apps you deployed to the device. Don’t add devices to the group until every pilot device passes all three.

#What goes wrong during the ESP

When a device stalls, press Shift+F10 at the out-of-box experience for a command prompt and collect the Autopilot logs:

1%windir%\system32\mdmdiagnosticstool.exe -area Autopilot;DeviceEnrollment -cab %temp%\autopilot-logs.cab

That cab omits the client logs, so also copy %windir%\ccmsetup\Logs and %windir%\CCM\Logs.

  • Error 0x800705b4 in Device preparation. The ESP timed out waiting for the client. The Shell-Core log shows CommercialOOBE_ESPDevicePreparation_PolicyProvidersInstallation_TimedOut. Read InstallationState: 1 means CCMSetup.msi never downloaded or never started, so check the policy assignment and the device’s path to Intune; 4 means setup failed, so read %windir%\ccmsetup\Logs\ccmsetup.log.
  • WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA in ccmsetup.log. The device doesn’t trust the CMG server authentication certificate. Fix the trust chain, not the command line.
  • Apps error in Device setup. The task sequence failed or ran past the timeout. Shell-Core shows CommercialOOBE_BootstrapStatusCategory_SubcategoryProcessing_Failed; read %windir%\CCM\Logs\SMSTS\smsts.log. With state 1 or 2, remove long-running steps or raise the ESP timeout; with 4, fix the failing step. If the sequence installs software updates or applications, the client needs a valid client authentication certificate, because token authentication alone doesn’t work for that.
  • Hybrid-joined devices time out at the ESP. That scenario isn’t supported with this policy. Install the client after Autopilot instead.
  • Deployments fail on devices using an Autopilot device preparation policy. Device preparation doesn’t support Autopilot into co-management; keep these devices on an Autopilot deployment profile.

If the device never reaches the ESP at all, the fault is earlier: work through why an Autopilot device shows profile not assigned first.

A man sits in an office with hands on head in front of a laptop, overlooking a cityscape.
Photo by cottonbro studio on Pexels

#Backing out of the pilot

Back out in this order, so new devices stop taking the change before you touch the ones already built:

  1. Remove the pilot device group from the co-management settings policy’s assignments. Devices provisioned in that group afterwards no longer get the client from this policy, so restore your previous install method for them if you still need it.
  2. Don’t flip the Advanced override on existing devices to change their workload authority. Change the workload sliders in Configuration Manager instead; a workload switched to Intune can be switched back, although Windows and Office versions that Intune upgraded stay at the later version.
  3. If a pilot device needs the client removed, run ccmsetup.exe /uninstall as an administrator after confirming no running deployment depends on it. From version 2111 this also removes the ccmsetup.msi bootstrap. To restore it, reprovision the device through Autopilot once the policy is fixed.
  4. Verify: the device no longer appears as co-managed in SMS_Client_ComanagementState, and the next device provisioned in the group completes the ESP without the Preparing your device for mobile management wait for the client.

#What to track while the pilot runs

Baseline the Win32 app method first: ESP failures or rebuilds that involved the client, and time from first sign-in until Software Center showed the user’s apps. Track the same for pilot devices, plus the share reaching InstallationState 3 first time and the count of 0x800705b4 timeouts, and review them weekly. A sensible threshold for widening the assignment is every pilot device reaching state 3 with no ESP timeouts across a full week of builds; that is an operating recommendation, not a Microsoft figure.

#Before you switch every new device to the co-management policy

  • Configuration Manager is version 2111 or later, the CMG is healthy and the Enablement tab shows a command line.
  • Devices are user-driven and Entra joined; none are hybrid joined, pre-provisioned or on a device preparation policy.
  • Clients authenticate to the CMG with Microsoft Entra ID, and devices trust the CMG server certificate.
  • The command line has CCMHOSTNAME and SMSSITECODE and is no longer than 1,024 characters.
  • Any PROVISIONTS task sequence is deployed to All Provisioning Devices, works with Default Client Settings and is short enough for the ESP timeout.
  • No workload is set to Pilot Intune, and the Advanced override is decided and won’t change.
  • ESP apps come from one provider, not both.
  • Pilot devices all show state 3 and appear as co-managed clients, and you know the rollback order above.

About this page

Credited to

Dates

Published

Sources

This page lists no external sources.

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Reader Interaction

Comments

Add a thoughtful note on Install the Configuration Manager Client During Windows Autopilot With Intune Co-Management Settings. Comments are checked for spam and held for moderation before appearing.

Loading comments...

Discover more

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Operate smarter, with fewer recurring tickets.

Receive new operational playbooks, incident-prevention guidance, automation scripts and recovery runbooks.