Unlink a users workplace join account while device is also Entra ID joined

Brass Contributor

We have a number of users on Entra ID joined devices that were prompted to register their devices when signing into teams with another org account. My question has two parts - how can we programmatically remove the Workplace Join account and how do we avoid users from doing it again?

2 Replies
Thanks, but unfortunately this doesn't help me. These devices were AAD joined using Autopilot and then registered to another org tenant. Basically, users signed into Teams with another org creds and were prompted to register the device (a design decision I still scratch my head over). Since these are in another orgs tenant, we do not have the capability to clean up the devices, and dsregcmd /leave just completely breaks everything.