Published 2025-11-18 by TechNet New England
Credit Where It's Due
This guide is based on the excellent documentation from T-Minus 365. Their comprehensive defederation guides have helped countless MSPs and IT administrators reclaim control of GoDaddy-federated tenants.
Original source: T-Minus 365 Defederation Documentation
If you've ever purchased Microsoft 365 through GoDaddy, you know the pain. GoDaddy federates your domain and tenant, locking you into their ecosystem. You can't transfer to a CSP partner, you can't go direct with Microsoft, and if you call GoDaddy to defederate, they'll often delete all your users and data first.
The good news? You can defederate without calling GoDaddy, keep all your user accounts and data, and have zero mail flow downtime. The bad news? After defederation, you might run into a frustrating iPhone authentication error that won't go away no matter what you try.
This guide covers both: the complete defederation process and the fix for that stubborn iPhone error.
Understanding the Problem
When you purchase Microsoft 365 through GoDaddy, they federate your domain to their identity provider. This means:
- Authentication flows through GoDaddy's systems
- You can't transfer the tenant to another CSP or go direct with Microsoft
- If you want to leave, GoDaddy's "defederation" process involves deleting everything
- User passwords are managed through GoDaddy's federated login
Defederation breaks this federation, returning control of authentication to your Microsoft tenant directly.
️ CRITICAL: Before You Start
1. Use the admin@[netorg].onmicrosoft.com Account
Do NOT use your regular admin account on your custom domain. You must use the built-in admin account that ends in @[netorg].onmicrosoft.com or @[randomstring].onmicrosoft.com. This account exists outside the federation and will still work after defederation. Your federated domain admin accounts may lose access during the process.
2. Create a Break Glass Account BEFORE Defederating
A "break glass" account is an emergency Global Administrator account that you never use except in emergencies. Create one before starting:
- Username: Something like
breakglass@[yournetorg].onmicrosoft.com - Password: 25+ characters, random, stored securely offline (password manager or safe)
- Role: Global Administrator
- MFA: Configured but use a separate method (hardware key or different phone)
- Never log in unless the primary admin account is locked out
If something goes wrong during defederation and you get locked out of your main admin account, the break glass account is your lifeline. Without it, you may need to contact Microsoft support and wait days to regain access.
The Defederation Process
Important Warning
Defederating requires all users to reset their passwords. They will not be able to log in with their old passwords after defederation. Plan a maintenance window and have temporary passwords ready to distribute.
Phase 1: Preparation
- Create a break glass account - Global Admin on the onmicrosoft.com domain with a long random password stored securely
- Verify admin access - Confirm you can log into
admin@[netorg].onmicrosoft.com - Notify your users - Schedule a maintenance window and explain that passwords will be reset
- Prepare temporary passwords - Either collect new passwords from users beforehand or prepare to distribute temporary passwords
- Document current state - Export user lists, license assignments, and group memberships
Phase 2: Gain Administrative Access
You need access to the true Global Admin account, which is typically admin@[netorg].onmicrosoft.com (not your federated domain).
- Go to the Azure Portal (portal.azure.com)
- Sign in with your
admin@[netorg].onmicrosoft.comaccount - If you don't know the password, reset it through Azure AD
- Verify you have Global Administrator role
Tip: The "netorg" name is usually visible in your Microsoft 365 admin center URL or in the Azure AD tenant information. It might look like netorg12345678.onmicrosoft.com.
Phase 3: Install Microsoft Graph PowerShell
The old MSOnline module is deprecated. Use Microsoft Graph PowerShell instead:
# Install the Microsoft Graph module
Install-Module Microsoft.Graph -Scope CurrentUser
# Connect with the required permissions
Connect-MgGraph -Scopes "Domain.ReadWrite.All"
Phase 4: Remove Federation
This is the critical step. Run this command for each federated domain:
# Check current domain status
Get-MgDomain | Select-Object Id, AuthenticationType
# Defederate the domain (change to Managed)
Update-MgDomain -DomainId "yourdomain.com" -AuthenticationType "Managed"
Critical Note
ALL domains in the tenant must be in a managed state for this to work correctly - even domains that are no longer in use. Check all domains with Get-MgDomain and defederate any that show as "Federated."
Phase 5: Reset User Passwords
After defederation, users cannot log in until their passwords are reset. You can do this manually in the admin portal or in bulk:
# Reset a single user's password
$password = @{
Password = "TempP@ssw0rd123!"
ForceChangePasswordNextSignIn = $true
}
Update-MgUser -UserId "user@yourdomain.com" -PasswordProfile $password
Phase 6: Set Up New Licensing
- Establish a CSP relationship or go direct with Microsoft
- Purchase new licenses through your new provider
- Assign the new licenses to users
- Remove the old GoDaddy license assignments
Phase 7: Remove GoDaddy Access (CRITICAL)
Do This BEFORE Canceling with GoDaddy
Remove GoDaddy as a delegated admin before you cancel your subscription with them. If you cancel first, they may run a script that deletes all users and removes your primary domain.
- Go to Microsoft 365 Admin Center
- Navigate to Settings → Partner Relationships
- Remove GoDaddy as a partner
- Then cancel your GoDaddy subscription
The iPhone Problem: Error AADSTS50020
You've done everything right. Defederation is complete. Desktop Outlook works. Webmail works. But when users try to add their email on their iPhone, they get:
You've tried:
- Deleting and reinstalling the Outlook app - doesn't work
- Clearing browser cache - doesn't work
- Removing saved Microsoft passwords - doesn't work
- Deleting the account from Microsoft Authenticator - doesn't work
The problem? There are cached authentication tokens buried deep in Microsoft's shared authentication system on iOS that survive all of these steps.
The Fix: Edge Browser Sign-Out
Microsoft Edge on iOS shares authentication state with other Microsoft apps. There's a hidden diagnostics page that lets you clear these cached tokens.
Step-by-Step Fix
- Download Microsoft Edge on the iPhone if it's not already installed (free from the App Store)
- Open Edge and navigate to this URL:
edge://signin-internals - Scroll to the bottom of the page
- Tap "RemoveAllAccounts" (or "Sign out of all accounts")
- Close Edge completely
- Open Outlook and add the email account again
- Sign in fresh with the new password (post-defederation)
This clears the cached tokens that were still pointing to GoDaddy's federated identity provider, allowing the device to authenticate properly against your now-managed tenant.
Why This Works
Microsoft uses a shared authentication broker on iOS. When you sign into any Microsoft app (Outlook, Teams, OneDrive, Authenticator), it stores tokens that other Microsoft apps can use for single sign-on. After defederation, these tokens still reference the old federated identity provider.
The edge://signin-internals page gives you access to clear these shared tokens, something you can't do by simply deleting individual apps.
Alternative: Nuclear Option
If the Edge trick doesn't work, you may need to:
- Delete ALL Microsoft apps from the iPhone (Outlook, Teams, OneDrive, Authenticator, Edge, Word, Excel, etc.)
- Go to Settings → Passwords and remove any saved Microsoft credentials
- Go to Settings → Mail → Accounts and remove any Microsoft/Exchange accounts
- Restart the iPhone
- Reinstall Outlook and sign in fresh
Prevention: Communicate with Users
Before defederating, prepare your users:
- New passwords - Their old passwords will not work after defederation
- Re-authentication required - They'll need to sign into all Microsoft apps again
- Desktop apps - File → Account → Sign Out → Sign In with new password
- Mobile apps - May need the Edge signin-internals fix described above
Summary
Defederating from GoDaddy is possible without their help, without losing data, and without downtime. The key steps are:
- Create a break glass account first - Emergency Global Admin on onmicrosoft.com domain
- Use the
admin@[netorg].onmicrosoft.comaccount (not your federated domain) - Use Microsoft Graph PowerShell to change authentication to "Managed"
- Reset all user passwords
- Set up new licensing through CSP or direct
- Remove GoDaddy as partner BEFORE canceling
- For stubborn iPhone issues, use
edge://signin-internalsto clear cached tokens
Resources
- T-Minus 365: Defederating GoDaddy 365 - The original and most comprehensive guide
- T-Minus 365 Blog: Defederating GoDaddy 365
- Microsoft Learn: GoDaddy Defederation Process
- Microsoft Learn: Error AADSTS50020 Troubleshooting
Need Help?
GoDaddy defederation can be tricky, especially for larger organizations. If you'd rather have professionals handle it, contact us for assistance with your Microsoft 365 migration.