T The Triage ManualTechnical Guides for IT Emergencies
P3 · Exchange & Mail Flow

Exchange On-Premises Federation Trust Broken with SOAP Auth Failure After Office 365 Domain Verification

After deleting and recreating an on-premises Exchange federation trust during Office 365 domain verification, Test-FederationTrust fails with SOAP fault errors 0x80048821 / 0x80041012 ('passwords do not match') when requesting a delegation token from the Microsoft Federation Gateway. Despite the misleading error wording, the issue is caused by a certificate or ApplicationIdentifier binding mismatch introduced by trust recreation, and may be compounded when the remote federated organisation has not yet migrated to Office 365. Resolution involves removing and cleanly recreating the federation trust, validating DNS proof records, and confirming the remote organisation's migration status.

Indicators

Likely causes

Diagnostic steps

  1. Run 'Test-FederationTrust -Verbose' in Exchange Management Shell and capture the full output to identify the exact failure point in the token request chain, noting the error codes returned.
  2. Run 'Get-FederationTrust | FL' to review the ApplicationIdentifier, ApplicationUri, OrgCertificate thumbprint, and endpoint configuration for inconsistencies.
  3. Run 'Get-FederatedOrganizationIdentifier | FL' to verify the federated domains and account namespace are correctly configured and match the Office 365 verified domain.
  4. Verify the federation DNS TXT proof record is still present and valid in public DNS using 'Resolve-DnsName -Name autodiscover.<yourdomain.com> -Type TXT' or an external DNS lookup tool. Recreate the record if it was removed during Office 365 domain verification.
  5. Remove the existing broken federation trust: 'Remove-FederationTrust "Microsoft Federation Gateway"', then recreate it via the Exchange Admin Center Enable Federation wizard or the 'New-FederationTrust' cmdlet, ensuring the DNS proof token is re-applied.
  6. After recreating the trust, run 'Test-FederationTrust -Verbose' again and confirm token retrieval succeeds past the delegation token request stage before re-enabling organisational relationships.
  7. Check whether the remote federated organisation's Exchange environment has also been migrated to Office 365, as a cross-version federation endpoint incompatibility may be the root cause that cannot be resolved locally.
  8. If the issue persists after all local remediation steps, open a Microsoft Support ticket referencing error codes 0x80048821 and 0x80041012 with the full Test-FederationTrust -Verbose output attached.

Resolution path

Prevention

Tools

References

exchange-on-premisesfederation-trustoffice-365hybrid-configurationmicrosoft-federation-gatewaysoap-faultauthentication-failureorganisational-relationships0x800488210x80041012delegation-tokendns-proof-record