Support Tip: Configuration Policy Shows as Pending on Windows Devices
Published Jan 21 2020 03:53 PM 30.2K Views

By Lee Yan | Sr. Service Engineer | Intune Support as a Feature

 

You’re in the process of getting your new device ready for use for an end user, and then you find that the device shows as pending for certain policies or apps in the console. You’re wondering why – what happened – it’s a clean/brand new device, it's Azure AD joined,  and you’ve targeted policies and apps to the user who will use the device. This can be expected, as we explain below – it’ll make sense after we walk through how it works.
 
When you enroll a Windows device into Intune through Azure AD join with auto-enrollment, the workflow typically starts with a local admin user logged on. Often the user will go through settings > Accounts > Access work or school > Connect, and then the device gets enrolled into Intune. At this point in time, the device will check into the Intune service using the device certificate. The service actually doesn’t know who the logged in user is because the local admin who initiated the workflow is still logged on and the MDM agent cannot get the Azure AD user token. When this happens any user-based policies or user-targeted apps (policies and apps assigned to a user group) will not take effect, and the admin console will show the policy or app as pending for the device. If you are looking for an immediate resolution, you can do one of the following:
  1. On the device, log off as a local user and log back on as the Azure AD user. You can check on the device if the user is an Azure AD user by running this command from a cmd prompt: whoami /UPN. Make sure the UPN shown is the Azure AD user email address.
  2. Assign the policy to a device group containing the affected device. Then, from Settings > Accounts > Access work or school, click on the Connected to <aad_account> > Info > Sync to perform a device sync. While typically you want policies to apply to the user, not the device, this is a quick workaround to ensure policies such as encryption reports back compliance.
 
You can also check the Event logs from the client to determine if you are running into this issue. Below are the event log entries you would see if the logged on user is not an Azure AD user:
 
From Microsoft-Windows-User Device Registration/Admin, Event 360:
Device is AAD joined (AADJ or DJ++) : Yes
User has logged on with AAD credentials: No
 
From Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin, Event 212:
MDM Session: Failed to get AAD Token for sync session User Token: (Unknown Win32 Error code: 0xcaa20003) Device Token: (Incorrect function.).
 
Once the device checks in with the proper user credentials then the status will be updated (typically less than 30 minutes after a device sync).
 
Note that this does not affect Bring Your Own Device (BYOD) or co-managed devices (those with Configuration Manager and Intune).
 
Hope this helps explain the device experience when a local admin is logged in!
 
Post updated:
  • 5/18/2020 - Updated with note on BYOD, and the addition of apps in the write-up, and clarification on when this scenario may occur. 
7 Comments
Brass Contributor

The device will be assigned to the first user logging in, with no possibility to change. So not really a solution until this is fixed: https://microsoftintune.uservoice.com/forums/291681-ideas/suggestions/31356574-change-registereed-ow...

Copper Contributor

I usually use DEM account with autoenroll into Intune as first user and have no problem with applying policies. As per changing primary user - since last version of Intune, I have a button for it in Device Properties, but it doesnt work (ticket already created) :)

Hi @AlenaS, thanks for the feedback! Unfortunately the UI has gone out a little early. We’re working on correcting that (removing the UI), as there are still a few more bits that need to be done before this feature is ready. Stay tuned to our What's new for an announcement on when it'll be ready! :smile:

Hi @AlphaSeb, we're excited to announce that we started rolling out a feature giving you the ability to change a device’s primary user. More info can be found here: Change the Intune Primary User – Public Preview Now Available.

Brass Contributor

@Intune_Support_Team thank you! As I'm a very close follower of your blog I have spotted this already and tried it out! It seems to work for Windows Devices, but not for iOS Devices:

I want to "Remove primary user" from a shared iOS Device:


1) I navigate to the devices properties and click "Remove Primary User"

2) I click "Save"

3) I get the confirmation that it has been saved successfully

4) As I want to navigate away, Edge says that "Your unsaved edits will be discarded"

5) I navigate back and forth to the page, and the updated value has not been saved.

 

AlphaSeb_1-1584087225142.png

Microsoft

@AlphaSeb Changing Primary user is only supported on Windows devices, not iOS. We've fixed a bug where the UI was incorrectly showing for iOS devices but as you've noted, the change does not apply. You should see this bug resolved as the UI is updated with 2003 (over the next week or so).

Copper Contributor

I'm in this situation, however the user is definitely signed in with their Azure AD account, however Event 360 is present as is Event ID 212. The device has many policies and profiles in the pending state. On my device, Event 360 is present, but Event 212 is not present and all the policies and profiles are being applied.

JeremyHagan_0-1643844676811.png

JeremyHagan_1-1643844760029.png

I haven't found any other persistent errors except the Event 212 for this device and haven't found a way forward to resolve it.

 

Version history
Last update:
‎Dec 19 2023 01:30 PM
Updated by: