MDMDeviceID after wipe is missing

ehsan fahradi 21 Reputation points


I'm using a personal script that reads the MDM client id from registry:


which I believe is the unique client ID that is assigned to the device after each enrollment. After wiping (with the option "keep enrollment state" enabled) the device however, my script fails to fetch this value because this registry key no longer exists, even though the device is still enrolled to in-tune.

I guess my question is: is there a way on the client that I can get the MDM Device ID reliably?


Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,721 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lu Dai-MSFT 28,366 Reputation points

    @ehsan fahradi Thanks for posting in our Q&A.

    Based on my research, the DeviceClientId seems related to UDID and it is generated locally on the device by the Windows operating system. After the DeviceClientId is created, this value does not change unless it’s manually deleted or the device is wiped/factory reset. For more details, please refer to the following link:
    Note: Non-Microsoft link, just for the reference.

    It is suggested to check if there is "UDID" under the device's hardware page in intune portal.

    Hope it will help.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.