Stranded in a login loop? Here is how to regain control of your device in under 10 minutes.
If you’ve ever seen the message "something went wrong your organization has deleted this device" pop up on your screen, the panic is understandable. Suddenly, Outlook won’t send mail, Teams refuses to connect, and your browser throws up a block. It feels like your laptop just broke. It didn’t. In my 15 years of managing IT infrastructure, I’ve seen this error thousands of times, and I can tell you with certainty: this is almost never a hardware failure. It is a ghost in the machine—a lingering piece of a MDM profile or Azure Active Directory (now Entra ID) registration that no longer matches the state of your device on the server.
This guide is not for just one person. If you are an end user staring at a frozen Office app, skip to the "Quick Fixes" section. If you are an IT admin trying to batch-resolve this across twenty laptops, head straight to the "Technical Deep Dive." Either way, we are going to fix the mismatch between your local PC and the cloud directory so you can get back to work.
Decoding the Error: What 'Device Deleted by Organization' Actually Means
The Role of Entra ID and MDM in Device Management
To understand why this happens, you have to understand how modern Windows and macOS systems talk to the cloud. Microsoft uses a service called Entra ID (formerly Azure AD) to track not just who is logging in, but what they are using. When you add a work account to your PC, the device gets a digital fingerprint—a device registration.
This is where compliance policies come in. Your IT department sets rules: "If this device hasn't checked in for 30 days, or if its BitLocker status is unknown, mark it as non-compliant." When a device is marked non-compliant, or if an admin manually removes it from the directory to clean up a stale record, the server says, "I don't know this device anymore."
However, your laptop doesn't know that yet. It still holds the old token, the old registration ID, and the local MDM profile. When you try to authenticate, the server rejects the token, but the client application (like Outlook) doesn't know why. It just shows you the generic "Something went wrong" error. The distinction is crucial: this isn't about your hard drive failing; it's a desynchronization between the local cache and the cloud directory.
Why This Error Appears on Your Phone or Laptop
In most cases I’ve handled, this error is triggered by one of three specific scenarios.
First, an admin manually revoked access. Maybe an employee left, and their account was disabled, but the device record wasn't cleaned up properly, leaving orphaned tokens. Second, the device lost network sync. If a laptop sits in a drawer for a month and then you turn it on, it tries to authenticate with a stale token that the server has already purged. Third—and this is the one that drives me crazy—system time mismatches. I once spent four hours debugging a client's Outlook app, only to find their PC clock was off by 12 hours due to a failed NTP sync. The authentication token was technically valid, but the time window for the handshake was wrong, causing the server to reject the device as "deleted" or "invalid."
Quick Fixes for End Users: Reconnect or Remove Organization Profile
Method 1: Remove Work/School Account via Settings (Windows/macOS)
If you are a regular user, your first move is to break the link between the local OS and the work account. This clears the local MDM cache that is causing the conflict.
On Windows 11, the path is slightly different than older versions. Go to Settings > Accounts > Access work or school. You’ll see your work email listed there. Click on it and select Disconnect. A warning will appear saying your app data might be affected. Click Yes.
On macOS, the process is similar but less visual. Open System Settings (or System Preferences on older versions), go to Profiles (if available via MDM) or simply remove the account from User & Groups and re-add it later if needed. But on most personal Macs running BYOD, the issue is usually tied to the Outlook or Teams app itself.
If you are specifically getting "Outlook says organization deleted this device," follow these steps:
- Sign out of all Microsoft apps (Teams, Outlook, Word).
- Clear the Windows Credential Manager. Press
Win + R, typecontrol /name Microsoft.Credentials, and remove any credentials for your work email. - Restart your PC.
- Log back into Outlook.
Method 2: Force Sync and Re-authentication
Sometimes, the local registration is just confused. You can force it to re-register itself with the cloud without deleting it.
First, check your system time. Right-click the clock in the taskbar, go to Adjust date and time, and ensure Set time automatically is ON. If it was off, wait a minute for the sync to complete. This single step resolves about 20% of the "device deleted" errors I see because authentication tokens are sensitive to time drift.
Next, try a simple log-out/log-in cycle. In Outlook, sign out of your account completely, not just close the app. Use the "Sign out of all Office apps" option if you have Microsoft 365 installed. Then restart your computer. This clears the temporary MDM caches and forces the OS to request a new authentication token from Entra ID on boot.
Technical Deep Dive: Registry & Command Line Fixes for IT Pros
Using dsregcmd for Forced Recovery
For IT admins, the gold standard tool is dsregcmd (Device Registration Command). This is a built-in Windows utility that allows you to debug and re-join devices to the cloud directory.
Open an elevated Command Prompt (Admin) and run:
dsregcmd /status
This tells you the current state. If it says "AzureAdJoined: TRUE" but you know the device was deleted on the server side, you have a mismatch.
To force a re-recovery, run:
dsregcmd /forcerecovery
This command prompts for credentials and forces a new registration flow. In my experience, this is the most reliable fix for devices that are stuck in a "zombie" state—registered locally, deleted in the cloud.
For Hybrid Azure AD Joined devices, you need to be careful. If you just delete the registry keys, the automatic registration task might join it back immediately. To prevent auto-re-enrollment during cleanup, use:
dsregcmd /debug /leave
This leaves the domain properly, disabling the auto-registration scheduled tasks. Warning: Only run /leave if you intend to remove the device from the domain completely. For most "deleted device" errors, /forcerecovery is safer because it keeps the device in the correct state.
Manual Registry Inspection (Advanced)
If dsregcmd fails, we go to the registry. Always back up the registry before making changes. A bad delete here can break Windows update services.
The device registration GUIDs are stored here:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WorkplaceJoin\AADNGC
Under this key, you will see GUIDs that correspond to the user accounts linked to the device. If you have multiple work accounts on one PC, you might have multiple GUIDs. You need to identify the one associated with the problematic user.
I recommend using regedit to navigate to this path. Look for the GUID that matches the device ID you see in the Intune or Entra portal. Do not delete the entire AADNGC key unless you are removing all work associations. Instead, delete the specific child key (the GUID) for the user causing the error. After deletion, restart the wlmsvc (Web Live Sign-in) service or simply reboot the machine to clear the cached tokens.
Comparing Error Codes: 700003 vs. 700005 vs. 135011
Which Error Code Are You Seeing?
The generic "Something went wrong" message is unhelpful. The specific error code in the log or the prompt tells the real story. Here is a breakdown of the codes you’ll actually encounter, which helps you triage faster:
| Error Code | Meaning | Resolution Path |
|---|---|---|
| 700003 | Device registered locally, but marked as deleted/non-compliant in cloud. | Run dsregcmd /forcerecovery or remove/re-add work account. |
| 700005 | Device completely unregistered/removed from directory. | Requires IT admin to re-enroll device in Intune/Entra. End user cannot fix. |
| 135011 | Device disabled (not deleted), usually due to security policy. | Contact IT to check if device is quarantined or policy-blocked. |
| 0x800f0954 | Specific Intune enrollment failure during initial setup. | Often a network/proxy issue. Check proxy settings and re-run MDM enrollment. |
| If you see 700003, you are in the "Quick Fix" territory. If you see 700005, the server has wiped the slate clean, and no amount of local tinkering will help until an admin re-adds the device to the MDM inventory. This distinction saves you hours of wasted effort. |
Prevention: Stopping Accidental MDM Enrollment & Unregistering Devices
How to Unregister a Managed Device from Microsoft Intune
Prevention is better than cure. If you are an admin, you can proactively manage devices that are no longer needed.
To remove a device from the organization side:
- Go to the Intune Admin Center.
- Navigate to Devices > All Devices.
- Select the device.
- Click Unenroll. This removes the MDM policy but keeps the Entra ID registration intact (unless you check "Delete device from Microsoft Entra ID").
Crucial Distinction: There is a difference between Retire and Wipe.
- Retire: Marks the device as no longer managed but does not erase data. The user keeps their data.
- Wipe: Sends a remote command to erase the device. Never use Wipe on a BYOD device without explicit user consent and data backup instructions.
For users, you can often view your enrollment status in Settings > Accounts > Access work or school (Windows) or Settings > General > Device Management (iOS/Android). If you see "Management Enabled: YES" but you no longer need it, you can usually tap "Unenroll" if the MDM allows user-initiated removal. If the button is grayed out, you are locked in, and IT must act.
Best Practices to Avoid Future Issues
Here is a checklist I recommend to every client I work with:
- Enable Time Sync: Ensure NTP synchronization is always on. It’s the most common cause of token expiration errors.
- Audit Personal Device Management (PDM): If you allow BYOD, define exactly what MDM policies apply to personal containers vs. corporate data.
- Don’t Mix Accounts: Where possible, avoid signing into personal Microsoft accounts on corporate-joined devices, or vice-versa, to prevent cross-tenant authentication conflicts.
- Monitor Health: Use
msinfo32(System Information) to check MDM enrollment status periodically. If it says "MdmPolicyEnabled: Yes" and you didn’t intend to manage that device, investigate immediately.
Frequently Asked Questions
How to fix 'Your organization has deleted this device' error on Windows 11?
If you are on Windows 11 and hitting this error, here is the concise 3-step summary that works in 90% of cases:
- Check System Time: Ensure your clock is syncing with NTP servers.
- Remove Work Account: Go to Settings > Accounts > Access work or school, and disconnect the work account.
- Force Recovery (if admin rights available): Open CMD as Admin and run
dsregcmd /forcerecovery.
Can I remove my device from my work organization without IT?
Usually, no. While you can disconnect the local account to stop the errors, the server-side record in Intune or Entra ID remains. True unenrollment from the server requires IT admin action. However, if you are on a personal device that was accidentally enrolled, you might be able to self-unenroll via the Intune Company Portal app if your admin has enabled that policy.
Is my data lost if the organization deletes my device?
Your local files (documents on C:, downloads, etc.) typically remain on the disk. What gets blocked is access to cloud-synced data like OneDrive or SharePoint files, and your ability to authenticate to corporate apps. If the device is "Wiped" remotely, then yes, all data is lost. If it is just "Unenrolled," your data stays, but your access keys are invalidated until re-enrollment or proper account removal.
Conclusion
The "Something went wrong. Your organization has deleted this device" error is a configuration issue, not a hardware one. It is a mismatch between your local MDM profile and the Entra ID server.
For end users, the most effective fix is removing the work account from Settings and ensuring your system time is accurate. For IT admins, dsregcmd /forcerecovery is your best friend for clearing local zombies, while Intune portal actions are required for true server-side cleanup.
Don’t just accept the error. Monitor your device health. If you keep seeing these errors, there is a process gap in your MDM lifecycle management.
Still stuck? Download our free 'MDM Troubleshooting Checklist' to audit your setup, or comment below with your specific error code (700003, 700005, etc.) for a tailored response.