Prajwal Desai

SCCM | ConfigMgr | Intune | Windows 11 | Azure

  • Home
  • Cloud
    • Autopilot
    • Azure
    • Endpoint Analytics
    • Intune
    • PowerShell
    • Teams
    • Windows 365
  • Microsoft
    • Active Directory
    • Group Policy
    • SCCM
    • SCOM
    • Windows 10
    • Windows 11
    • Windows Server
    • WSUS
  • Software
  • Forums
  • Newsletter
  • Contact
Notification Show More
Latest News
Fix Windows Autopilot Reset Error 0x80070032
Fix Windows Autopilot Reset Error 0x80070032
Autopilot Intune
Windows activation error 0xc004c020
Fix: Windows Activation Error 0xC004C020 with 2 Easy Methods
Windows 11 Windows 10
Find the Package ID of SCCM Application
3 Best Ways to Find the Package ID of SCCM Application
SCCM
SCCM Updates Install Error 0x800b0109 0x8024b303
Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303
SCCM
Disable Windows Hello for Business using Intune ftimg
Disable Windows Hello for Business using Intune – Comprehensive Guide
Intune Autopilot
Aa

Prajwal Desai

SCCM | ConfigMgr | Intune | Windows 11 | Azure

Aa
Search
  • Home
  • Cloud
    • Autopilot
    • Azure
    • Endpoint Analytics
    • Intune
    • PowerShell
    • Teams
    • Windows 365
  • Microsoft
    • Active Directory
    • Group Policy
    • SCCM
    • SCOM
    • Windows 10
    • Windows 11
    • Windows Server
    • WSUS
  • Software
  • Forums
  • Newsletter
  • Contact
Follow US

Home » SCCM » Fix SCCM Client Site Code Discovery Unsuccessful

SCCM

Fix SCCM Client Site Code Discovery Unsuccessful

By Prajwal Desai 4 Views September 26, 2021 8 Min Read

In this post I will cover about SCCM client site code discovery unsuccessful. I recently helped an IT guy fix an issue where the SCCM client agent could not discover the site code. Manually entering the SCCM client site code and clicking Find Site showed Configuration Manager did not find a site to manage this client.

I had to first find out if this was the issue on all SCCM client agents or just one. As per this guy, the SCCM client site code discovery was unsuccessful on all computers. Finally when I asked him to give a background of SCCM setup, this is what he revealed.

So this guy had set up SCCM previously with a different SCCM client site code. It was a primary site with Management point and distribution point roles running on same server. On the same machine he installed SQL 2016 which had Configuration Manager DB on it.

Somehow he did not find things working well and he decided to uninstall the SCCM. Here is what actually went wrong. Instead of properly uninstalling SCCM, he deleted the VM on which SCCM was running. The client agents were still present on machines and had no way to contact Management Point.

- Advertisement -
Ad image

After few days he created another VM and installed Configuration Manager 1902. This time while installing the SCCM, he used a new site code and noticed that SCCM client agents were not discovering the site code.

Configuration Manager did not find a site to manage this client
Configuration Manager did not find a site to manage this client

Table of Contents

  • Troubleshooting SCCM Client Site Code Discovery Issue
  • SCCM Client Logs
  • Fix SCCM Client Site Code Discovery

Troubleshooting SCCM Client Site Code Discovery Issue

In the new SCCM setup, the SCCM client site code discovery issues. I noticed that client agents were unable to discover the site code. I did a basic audit of SCCM setup and it was all good. I also upgraded the SCCM version 1902 to 1906.

So the actual issue was that a large number of SCCM clients were failing to report to the primary site. As part of the troubleshooting this, I picked an existing machine and initiated client push install. The installation went fine but checking the client properties showed something like this.

The General tab of Configuration Manager Properties showed the client certificate as None. Most of all there was no entry of assigned management point. You can see that under client properties there is not much of information as we normally see.

SCCM Client Properties

Clicking the Components tab showed most of the components as Installed however the CCM notification agent status was Disabled.

SCCM Client Components

Under Actions tab, there were just 2 actions and rest of them were missing.

  • Machine Policy retrieval and evaluation cycle.
  • User Policy retrieval and evaluation cycle.
SCCM Action Cycles

SCCM Client Logs

So from the above information it was clear that SCCM agent wasn’t contacting the management point. Now comes the most interesting part which is checking the log files on the client machine. You can refer all the SCCM log files for troubleshooting purpose here.

On the client machine I first opened the ClientIDManagerStartup.log. There was just one error logged several times – RegTask: Failed to refresh site code. Error: 0x8000ffff.

Unfortunately you cannot deduce anything from the above error message.

ClientIDManagerStartup.log
ClientIDManagerStartup.log

I opened the LocationServices.log file on the client machine. Here I noticed many errors and these errors are listed below.

Retrieved lookup MP(s) from DNS	LocationServices
Attempting to retrieve site information from lookup MP(s)
Failed to send site information Location Request Message to server
Failed to send site information Location Request Message to server
LSIsSiteCompatible : Failed to get Site Version from all directories
Won't send a client assignment fallback status point message because the last assignment error matches this one.
Failed to execute task 'LSSiteRoleCycleTask'. Error 0x80004005
CSiteRoleCycleTask::Execute failed (0x80004005).
Failed to execute task 'LSSiteRoleCycleTask'. Error 0x80004005
CSiteRoleCycleTask::Execute failed (0x80004005).
Failed to execute task LSSiteRoleCycleTask Error 0x80004005
Failed to execute task LSSiteRoleCycleTask Error 0x80004005

Scrolling down further I noticed another error :-

  • LSGetSiteVersionFromAD : Failed to retrieve version for the site ‘USA’ (0x80004005).
  • LSIsSiteCompatible : Failed to get Site Version from all directories
  • Won’t send a client assignment fallback status point message because the last assignment error matches this one.

This was interesting because USA was the old site code and the new site code was something else. This means the client agent was still assigned to the old site.

LSGetSiteVersionFromAD : Failed to retrieve version for the site 0x80004005
LSGetSiteVersionFromAD : LSGetSiteVersionFromAD : Failed to retrieve version for the site 0x80004005

Fix SCCM Client Site Code Discovery

So the client agents in the new setup were still assigned to site code of old setup. In other words the SCCM client site code discovery was unsuccessful. To verify this I checked all the group policy objects and disabled the ones that were not required.

I also cleaned the DNS records to ensure the old SCCM site server info doesn’t exists anywhere.

We know that there are several ways to assign a Configuration Manager client to a site. When you assign or reassign the client to a site by using Windows Group Policy, the site code is stored in a registry key on client computers.

Microsoft doesn’t tell you what registry key holds the site code information. I found that it was GPRequestedSiteAssigmentCode in the registry.

This key is located under HKLM\SOFTWARE\Microsoft\SMS\Mobile Client.

I noticed that this key contained the site code of the old site which was USA.

GPRequestedSiteAssigmentCode

I changed the value of GPRequestedSiteAssigmentCode key from USA to new site code.

GPRequestedSiteAssigmentCode

After making the above changes, I could see that SCCM client agent site code discovery was successful. The client agent started to communicate with management point and all the action cycles were seen in few minutes.

SCCM Client Site Code Discovery Successful
SCCM Client Site Code Discovery Successful

I hope this post helps you to fix the SCCM client site code discovery issues.

Sign Up For Weekly Newsletter

Get the most recent information on Configuration Manager, Intune, Windows 11, Windows 365, Autopilot, Azure, Software Reviews, and much more by subscribing to the newsletter.
By signing up, you agree and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share this Article
Facebook Twitter Copy Link Print
Avatar photo
By Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Enterprise Mobility. He writes articles on SCCM, Intune, Configuration Manager, Microsoft Intune, Azure, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
Previous Article SCCM 1906 Hotfix KB4516430 ftimg SCCM 1906 Hotfix KB4516430 Early update ring
Next Article bitdef tot sec ftimg Bitdefender Total Security Utilities Overview
Recast Sponsored AD
Ad image
Patch My PC Sponsored AD
Ad image

Latest Articles

Fix Windows Autopilot Reset Error 0x80070032
Fix Windows Autopilot Reset Error 0x80070032
Autopilot Intune
Windows activation error 0xc004c020
Fix: Windows Activation Error 0xC004C020 with 2 Easy Methods
Windows 11 Windows 10
Find the Package ID of SCCM Application
3 Best Ways to Find the Package ID of SCCM Application
SCCM
SCCM Updates Install Error 0x800b0109 0x8024b303
Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303
SCCM
Subscribe to Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

You Might Also Like

Find the Package ID of SCCM Application
SCCM

3 Best Ways to Find the Package ID of SCCM Application

By Prajwal Desai
SCCM Updates Install Error 0x800b0109 0x8024b303
SCCM

Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303

By Prajwal Desai
ConfigMgr Technical Preview 2302 New Features
SCCM

ConfigMgr Technical Preview 2302 New Features | Baseline Version

By Prajwal Desai

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Lost your password?