In ODM AD under Devices + Servers select the device and run the Set Intune Primary User action fails with the following error:
Error[51]: PowerShell job BT-IntunePrimaryUser is failed.
Result code: -9
System.Management.Automation.RuntimeException: Unable to determine the device owner SID
The Enroll in Intune Management and AutoPilot/Intune Cleanup was not selected in the Microsoft Entra joined Profile.
Steps to troubleshoot the error:
Run the Set Intune Primary User if the Intune Primary User not update with login username.