Hello everyone. In this article, I will show how to fix the error message error_missing_device when you try to have your domain-joined device as Hybrid Join with Azure AD as part of this deployment plan available in this Microsoft public document ‘Plan your hybrid Azure Active Directory join implementation‘.
Scenario:
Device OS: Windows 10
GOAL: Have the device achieve the status ‘Hybrid Azure AD Joined’
Issue: Automatic-Device-Join task in the Windows Task Scheduler ends with ‘Las Run Result’ (0x1):

Investigation: Checking the local event viewer log Microsoft-Windows-User Device Registration/Admin, we see the error message below:
The get join response operation callback failed with exit code: Unknown HResult Error code: 0x801c03f3.
Activity Id: 003e9f28-1bb6-4a22-8498-XXXXXXXX
The server returned HTTP status: 400
Server response was: {“code”:”invalid_request”,”subcode”:”error_missing_device“,”message”:”The device object by the given id (f4caef4d-c69b-44e5-b1ff-XXXXXXXX) is not found.“,”operation”:”DeviceRenew”,”requestid”:”003e9f28-1bb6-4a22-8498-XXXXXXXX”,”time”:”03-31-2022 18:07:22Z”}
Checking Azure AD, we are not able to find the device under blade All devices:

Reason: As per Hybrid Azure AD Join prerequisites, if the computer objects of the devices you want to be hybrid Azure AD joined belong to specific organizational units (OUs), configure the correct OUs to sync in Azure AD Connect. To learn more about how to sync computer objects by using Azure AD Connect, see Organizational unit–based filtering. Reference: Prerequisites
Considering I am not able to see my device in Azure AD, as the next step, we will investigate why.
First, I will confirm which OU my device belongs to in the Active Directory:

Then, I will check in the AAD Connect tool if the OU ‘NO_DEVICE_SYNC’ is in the SYNC scope. To achieve this, I will open the AAD Connect tool and select Customize synchronization options:

In the Domain/OU Filtering tab, I select my current domain and confirm the OU is NOT in the SYNC scope:

Fix: To fix this issue, I can either move my machine to another OU or include the missing OU in the SYNC scope.
To fix my issue, I will check my OU named NO_DEVICE_SYNC and click Next until I reach the AAD Connect page below. Make sure the option Start the synchronization process when configuration completes is selected, and click Configure.

After the SYNC is finished, we can see my device named WS10-Hybrid added to Azure AD in the Synchronization Service Manager:

Now, searching for the same device in Azure AD, we can see it shows up with the status ‘Pending’:

The status above is expected on the devices which have been SYNCED to Azure AD, but have not started yet the Automatic-Device-Join task:
Test: Now, with the device under SYNC scope and pending for Hybrid registration, we see a different output in the Automatic-Device-Join task:

In the device, we can confirm the successful join through the Event viewer log named User Device Registration/Admin with event ID 306 showing the message: The complete join response operation was successful.

Now, checking the device status in Azure AD, we confirm it has changed from Pending to the date we completed the Hybrid Azure AD join process.

Summary
In this article, we covered how to troubleshoot error message error_missing_device when you try to configure your domain-joined device to Hybrid Join with Azure AD.
I hope you have enjoyed reading this article, and it helps you to manage your Device registration environment.
Enjoyed the article? Like and share. 🙂
Note: I do not represent the organization I work for, all the opinions expressed here, are my own. This post is provided AS IS with no warranties or guarantees and confers no rights.
In case you have any suggestions or feedback, please leave a comment.
[ ]’s
Ulysses Neves
