Hello Ryan,
The error code -2145833241 occurs when Windows cannot enable device management during enrollment. This usually points to a tenant-side configuration or licensing issue rather than a local PC problem. When a user adds a work account, Windows attempts to register the device with Azure AD and Intune. If Intune licenses are not assigned, or if enrollment restrictions block personal devices, the process fails with this error.
You should verify in the Microsoft 365 Admin Center that affected users have valid Intune or Microsoft 365 Business Premium/E3/E5 licenses. Next, check Endpoint Manager under Devices > Enrollment restrictions to confirm personal Windows devices are allowed. Also ensure automatic MDM enrollment is enabled in Azure AD > Mobility (MDM and MAM) and that the MDM URLs are correctly configured.
On the client side, remove the work account from Access work or school, run dsregcmd /leave to clear stale registration, then retry enrollment. If the same error appears across multiple machines, the root cause is almost certainly tenant configuration or licensing.
At that point, the best step is to review Intune enrollment policies and, if necessary, open a support case with Microsoft to confirm the tenant is properly set up for Windows device management.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Harry.