Why Clean Up Office 365 Exchange Online Application Certificates?
In hybrid Exchange environments, certificate accumulation in the Office 365 Exchange Online application is a common security and maintenance issue. Each time you run the Hybrid Configuration Wizard or update certificates, new certificate credentials get added to the shared Exchange Online service principal, but old ones rarely get removed automatically.
This certificate buildup creates several problems: increased attack surface from expired certificates, confusion during troubleshooting, and potential authentication conflicts. With Microsoft's deprecation of the Credential parameter in Exchange Online PowerShell (effective June 2026), proper certificate management has become even more critical for hybrid deployments.
What Certificate Types Need Regular Cleanup?
The Exchange Online application typically accumulates three types of certificates: OAuth authentication certificates used for server-to-server communication, legacy S2S token certificates from older hybrid configurations, and expired certificates from previous Hybrid Configuration Wizard runs. Each serves a specific purpose, but expired or unused certificates should be removed to maintain security hygiene.
The ConfigureExchangeHybridApplication.ps1 script, available from Microsoft's CSS-Exchange repository, provides the safest method to identify and remove these certificate credentials. This PowerShell script directly interacts with Azure AD to manage the Exchange Online service principal's certificate store, ensuring proper cleanup without disrupting active hybrid services.
Related: How to Deploy Microsoft 365 Copilot AI with Custom Security
Related: How to Migrate Exchange to Microsoft 365 Using Minimal



