Tech Community Live: Endpoint Manager edition
Jul 21 2022, 08:00 AM - 12:00 PM (PDT)

Support Tip: Configuration Policy Shows as Pending on Windows Devices

Published Jan 21 2020 03:53 PM 19.5K 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
%3CLINGO-SUB%20id%3D%22lingo-sub-1122343%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1122343%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20device%20will%20be%20assigned%20to%20the%20first%20user%20logging%20in%2C%20with%20no%20possibility%20to%20change.%20So%20not%20really%20a%20solution%20until%20this%20is%20fixed%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmicrosoftintune.uservoice.com%2Fforums%2F291681-ideas%2Fsuggestions%2F31356574-change-registereed-owner-for-corporate-owned-devic%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftintune.uservoice.com%2Fforums%2F291681-ideas%2Fsuggestions%2F31356574-change-registereed-owner-for-corporate-owned-devic%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1121378%22%20slang%3D%22en-US%22%3ESupport%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1121378%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EBy%20Lee%20Yan%20%7C%20Sr.%20Service%20Engineer%20%7C%20Intune%20Support%20as%20a%20Feature%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EYou%E2%80%99re%20in%20the%20process%20of%20getting%20your%20new%20device%20ready%20for%20use%20for%20an%20end%20user%2C%20and%20then%20you%20find%20that%20the%20device%20shows%20as%20pending%20for%20certain%20policies%20in%20the%20console.%20You%E2%80%99re%20wondering%20why%20%E2%80%93%20what%20happened%20%E2%80%93%20it%E2%80%99s%20a%20clean%2Fbrand%20new%20device%20and%20you%E2%80%99ve%20targeted%20policies%20to%20the%20user%20who%20will%20use%20the%20device.%20This%20is%20expected%2C%20as%20we%20explain%20below%20%E2%80%93%20it%E2%80%99ll%20make%20a%20lot%20of%20sense%20to%20you%20after%20we%20walk%20through%20how%20it%20works.%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EWhen%20you%20enroll%20a%20Windows%20device%20into%20Intune%2C%20the%20workflow%20typically%20starts%20with%20a%20local%20admin%20user%20logged%20on.%20Often%20the%20user%20will%20go%20through%20settings%20%26gt%3B%20Accounts%20%26gt%3B%20Access%20work%20or%20school%20%26gt%3B%20Connect%2C%20and%20then%20the%20device%20gets%20enrolled%20into%20Intune.%20At%20this%20point%20in%20time%2C%20the%20device%20will%20check%20into%20the%20Intune%20service%20using%20the%20device%20certificate.%20The%20service%20actually%20doesn%E2%80%99t%20know%20who%20the%20logged%20in%20user%20is%20because%20the%20local%20admin%20who%20initiated%20the%20workflow%20is%20still%20logged%20on%20and%20the%20MDM%20agent%20cannot%20get%20the%20Azure%20AD%20user%20token.%20When%20this%20happens%20any%20user-based%20policies%20or%20user-targeted%20apps%20(policies%20and%20apps%20assigned%20to%20a%20user%20group)%20will%20not%20take%20effect%2C%20and%20the%20admin%20console%20will%20show%20the%20policy%20or%20app%20as%20pending%20for%20the%20device.%20If%20you%20are%20looking%20for%20an%20immediate%20resolution%2C%20you%20can%20do%20one%20of%20the%20following%3A%3C%2FFONT%3E%3C%2FDIV%3E%0A%3COL%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EOn%20the%20device%2C%20log%20off%20as%20a%20local%20user%20and%20log%20back%20on%20as%20the%20Azure%20AD%20user.%20You%20can%20check%20on%20the%20device%20if%20the%20user%20is%20an%20Azure%20AD%20user%20by%20running%20this%20command%20from%20a%20cmd%20prompt%3A%20whoami%20%2FUPN.%20Make%20sure%20the%20UPN%20shown%20is%20the%20Azure%20AD%20user%20email%20address.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EAssign%20the%20policy%20to%20a%20device%20group%20containing%20the%20affected%20device.%20From%20Settings%20%26gt%3B%20Accounts%20%26gt%3B%20Access%20work%20or%20school%2C%20click%20on%20the%20Connected%20to%20%3CAAD_ACCOUNT%3E%20%26gt%3B%20Info%20%26gt%3B%20Sync%20to%20perform%20a%20device%20sync.%20While%20typically%20you%20want%20policies%20to%20apply%20to%20the%20user%2C%20not%20the%20device%2C%20this%20is%20a%20quick%20workaround%20to%20ensure%20policies%20such%20as%20encryption%20reports%20back%20compliance.%3C%2FAAD_ACCOUNT%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EYou%20can%20also%20check%20the%20Event%20logs%20from%20the%20client%20to%20determine%20if%20you%20are%20running%20into%20this.%20Below%20are%20the%20event%20log%20entries%20you%20would%20see%20if%20the%20logged%20on%20user%20is%20not%20an%20Azure%20AD%20user%3A%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EFrom%20Microsoft-Windows-User%20Device%20Registration%2FAdmin%2C%20Event%20360%3A%3CBR%20%2F%3EDevice%20is%20AAD%20joined%20(AADJ%20or%20DJ%2B%2B)%20%3A%20Yes%20%3CBR%20%2F%3EUser%20has%20logged%20on%20with%20AAD%20credentials%3A%20No%20%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EFrom%20Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%2FAdmin%2C%20Event%20212%3A%20%3CBR%20%2F%3EMDM%20Session%3A%20Failed%20to%20get%20AAD%20Token%20for%20sync%20session%20User%20Token%3A%20(Unknown%20Win32%20Error%20code%3A%200xcaa20003)%20Device%20Token%3A%20(Incorrect%20function.).%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EOnce%20the%20device%20checks%20in%20with%20the%20proper%20user%20credentials%20then%20the%20status%20will%20be%20updated%20(typically%20less%20than%2030%20minutes%20after%20a%20device%20sync).%20%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EHope%20this%20helps%20explain%20the%20device%20experience%20when%20a%20local%20admin%20is%20logged%20in!%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1121378%22%20slang%3D%22en-US%22%3E%3CP%3ERead%20this%20article%20for%20more%20information%20on%20when%20a%20new%20Windows%20device%20shows%20as%20pending%20for%20certain%20policies%20in%20the%20console.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1121378%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMDM%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESupport%20Tip%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1133150%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1133150%22%20slang%3D%22en-US%22%3E%3CP%3EI%20usually%20use%20DEM%20account%20with%20autoenroll%20into%20Intune%20as%20first%20user%20and%20have%20no%20problem%20with%20applying%20policies.%20As%20per%20changing%20primary%20user%20-%20since%20last%20version%20of%20Intune%2C%20I%20have%20a%20button%20for%20it%20in%20Device%20Properties%2C%20but%20it%20doesnt%20work%20(ticket%20already%20created)%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1138396%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1138396%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F535917%22%20target%3D%22_blank%22%3E%40AlenaS%3C%2FA%3E%2C%20thanks%20for%20the%20feedback!%26nbsp%3BUnfortunately%20the%20UI%20has%20gone%20out%20a%20little%20early.%20We%E2%80%99re%20working%20on%20correcting%20that%20(removing%20the%20UI)%2C%20as%20there%20are%20still%20a%20few%20more%20bits%20that%20need%20to%20be%20done%20before%20this%20feature%20is%20ready.%20Stay%20tuned%20to%20our%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fintune%2Ffundamentals%2Fwhats-new%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EWhat's%20new%3C%2FA%3E%26nbsp%3Bfor%20an%20announcement%20on%20when%20it'll%20be%20ready!%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%408341BD79091AF36AA2A09063B554B5CD%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1225843%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1225843%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307279%22%20target%3D%22_blank%22%3E%40AlphaSeb%3C%2FA%3E%2C%26nbsp%3Bwe're%20excited%20to%20announce%20that%20we%20started%20rolling%20out%20a%20feature%20giving%20you%20the%20ability%20to%20change%20a%20device%E2%80%99s%20primary%20user.%20More%20info%20can%20be%20found%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fintune-customer-success%2Fchange-the-intune-primary-user-public-preview-now-available%2Fba-p%2F1221264%22%20target%3D%22_self%22%3EChange%20the%20Intune%20Primary%20User%20%E2%80%93%20Public%20Preview%20Now%20Available%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1226377%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1226377%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F226779%22%20target%3D%22_blank%22%3E%40Intune%20Support%20Team%3C%2FA%3E%26nbsp%3Bthank%20you!%20As%20I'm%20a%20very%20close%20follower%20of%20your%20blog%20I%20have%20spotted%20this%20already%20and%20tried%20it%20out!%20It%20seems%20to%20work%20for%20Windows%20Devices%2C%20but%20not%20for%20iOS%20Devices%3A%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20to%20%22Remove%20primary%20user%22%20from%20a%20shared%20iOS%20Device%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E1)%20I%20navigate%20to%20the%20devices%20properties%20and%20click%20%22Remove%20Primary%20User%22%3C%2FP%3E%3CP%3E2)%20I%20click%20%22Save%22%3C%2FP%3E%3CP%3E3)%20I%20get%20the%20confirmation%20that%20it%20has%20been%20saved%20successfully%3C%2FP%3E%3CP%3E4)%20As%20I%20want%20to%20navigate%20away%2C%20Edge%20says%20that%20%22Your%20unsaved%20edits%20will%20be%20discarded%22%3C%2FP%3E%3CP%3E5)%20I%20navigate%20back%20and%20forth%20to%20the%20page%2C%20and%20the%20updated%20value%20has%20not%20been%20saved.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AlphaSeb_1-1584087225142.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F176705i4916787A34A70A0C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AlphaSeb_1-1584087225142.png%22%20alt%3D%22AlphaSeb_1-1584087225142.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1235858%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1235858%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307279%22%20target%3D%22_blank%22%3E%40AlphaSeb%3C%2FA%3E%26nbsp%3BChanging%20Primary%20user%20is%20only%20supported%20on%20Windows%20devices%2C%20not%20iOS.%20We've%20fixed%20a%20bug%20where%20the%20UI%20was%20incorrectly%20showing%20for%20iOS%20devices%20but%20as%20you've%20noted%2C%20the%20change%20does%20not%20apply.%20You%20should%20see%20this%20bug%20resolved%20as%20the%20UI%20is%20updated%20with%202003%20(over%20the%20next%20week%20or%20so).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3108342%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20Tip%3A%20Configuration%20Policy%20Shows%20as%20Pending%20on%20Windows%20Devices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3108342%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20in%20this%20situation%2C%20however%20the%20user%20is%20definitely%20signed%20in%20with%20their%20Azure%20AD%20account%2C%20however%20Event%20360%20is%20present%20as%20is%20Event%20ID%20212.%20The%20device%20has%20many%20policies%20and%20profiles%20in%20the%20pending%20state.%20On%20my%20device%2C%20Event%20360%20is%20present%2C%20but%20Event%20212%20is%20not%20present%20and%20all%20the%20policies%20and%20profiles%20are%20being%20applied.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JeremyHagan_0-1643844676811.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344840i07337292C0EB0E78%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JeremyHagan_0-1643844676811.png%22%20alt%3D%22JeremyHagan_0-1643844676811.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JeremyHagan_1-1643844760029.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344841iB46DFA6291C25F72%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JeremyHagan_1-1643844760029.png%22%20alt%3D%22JeremyHagan_1-1643844760029.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20haven't%20found%20any%20other%20persistent%20errors%20except%20the%20Event%20212%20for%20this%20device%20and%20haven't%20found%20a%20way%20forward%20to%20resolve%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎May 18 2020 11:09 AM
Updated by: