Fix Microsoft 365 Error AADSTS7000112 for Exchange Online
Question details
Restore access to Exchange Online when the sign-in error says its application service principal is disabled.

- Product
- Microsoft 365 Exchange Online and Microsoft Entra ID
- Device & OS
- Windows 10 Enterprise 2016 LTSB
- Scenario
- A user is trying to sign in to Exchange Online in a Microsoft 365 tenant.
- Observed behavior
- Sign-in returns error AADSTS7000112, indicating that the Exchange Online application service principal is disabled.
Ask a Microsoft 365 global administrator to confirm that the error identifies the Exchange Online service principal and that it was not disabled intentionally. The administrator needs access to the affected tenant and permission to manage its enterprise applications.
Enable the Exchange Online service principal with Microsoft Graph PowerShell
Use this method when the Exchange Online service principal is disabled in the affected tenant.
The original MSOnline PowerShell commands in older guidance use a retired module. Microsoft Graph PowerShell provides a current way to inspect and update the service principal.
Open PowerShell and run Install-Module Microsoft.Graph -Scope CurrentUser. Confirm the installation prompts if requested.
Run Connect-MgGraph -TenantId '<tenant-id>' -Scopes 'Application.ReadWrite.All', replacing <tenant-id> with the affected tenant ID. Sign in as a global administrator and grant consent if prompted.
Run $sp = Get-MgServicePrincipal -Filter "appId eq '00000002-0000-0ff1-ce00-000000000000'" -Property 'id,appId,displayName,accountEnabled', then run $sp | Select-Object Id, AppId, DisplayName, AccountEnabled. Confirm that the Exchange Online entry is present and AccountEnabled is False.
If the entry is disabled and you have confirmed it is safe to enable, run Update-MgServicePrincipal -ServicePrincipalId $sp.Id -AccountEnabled:$true. Then run Get-MgServicePrincipal -ServicePrincipalId $sp.Id -Property 'id,displayName,accountEnabled' | Select-Object Id, DisplayName, AccountEnabled to verify that AccountEnabled is True.
Return to the Exchange Online sign-in page and try signing in again. If the error persists, provide the error details and sign-in timestamp to your Microsoft 365 administrator.

Work on Office files with WPS Office while sign-in is investigated
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Its format compatibility can make migration easier, but it does not enable Exchange Online or fix Microsoft 365 sign-in errors.

Frequently Asked Questions
What does AADSTS7000112 mean for Exchange Online?
In this scenario, the error means the Exchange Online application service principal is disabled in the Microsoft Entra tenant. An administrator can check its AccountEnabled status with Microsoft Graph PowerShell.
Who can enable the Exchange Online service principal?
A Microsoft 365 global administrator can connect to the affected tenant with Microsoft Graph PowerShell and update the service principal. The Graph session also needs the appropriate permission and admin consent.
Can I still use the Get-MsolServicePrincipal command?
The MSOnline PowerShell module used by Get-MsolServicePrincipal has been retired. Use Get-MgServicePrincipal and Update-MgServicePrincipal in Microsoft Graph PowerShell instead.
Will clearing my browser cache fix a disabled service principal?
Clearing the cache may help with browser-specific sign-in issues, but it does not enable a disabled tenant service principal. Ask an administrator to check the application's AccountEnabled status.




