It seems like Exchange Online has been the center of Microsoft"s attention lately. The company recently rolled back a configuration change because of customer backlash, issued a warning against using a cmdlet in unsupported scenarios, delayed a feature deprecation after feedback from IT admins, and reminded organizations about the upcoming retirement of Exchange Online EWS. Now, it has announced the deprecation of yet another Exchange Online-related configuration.
Basically, Microsoft is retiring the -Credential parameter in the Exchange Online PowerShell module because it relies on the legacy Resource Owner Password Credentials (ROPC) authentication flow, rather than multi-factor authentication (MFA). MFA is mandatory in Microsoft"s cloud services, so as the company strengthens its security baselines, it is deprecating ROPC since it does not support MFA.
As it stands, the -Credential parameter in the Exchange Online PowerShell module is supported until June 2026. However, Microsoft"s recommended action that is effective immediately is to stop leveraging the parameter while connecting to Exchange Online using the Connect-ExchangeOnline cmdlet. After June 2026, the module will not support this parameter, so you will not be able to use it at all.
If you still utilize -Credential, you should utilize the following alternatives:
| Scenario / Use Case | Recommended Authentication Method | Description | Documentation |
|---|---|---|---|
| Admins connecting interactively | Interactive Sign‑In (Modern Auth + MFA) | Secure sign-in for human administrators; supports MFA and Conditional Access. | Connect to Exchange Online PowerShell | Microsoft Learn |
| Automation running outside Azure | App‑Only Authentication | Certificate‑based or secret‑based app registration for non‑interactive automation. | App-only authentication in Exchange Online PowerShell and Security & Compliance PowerShell | Microsoft Learn |
| Automation running in Azure services | Managed Identity Authentication | Ideal for Functions, Automation Accounts, and cloud-native tasks. Eliminates secrets entirely. | Use Azure managed identities to connect to Exchange Online PowerShell | Microsoft Learn |
Since the writing is on the wall for the parameter, it is advisable to move away from its use starting today rather than waiting for the deadline in order to avoid disruption to operational processes.