r/PowerShell • u/KavyaJune • Feb 17 '26
Your existing Exchange Online PowerShell scripts might fail
Microsoft is removing support for the -Credential parameter in new versions of the Exchange Online PowerShell module released after June 2026.
The -Credential parameter relies on ROPC (legacy authentication), which does not support MFA or Conditional Access. Because of this, Microsoft is removing support for it in future module releases.
If you’re using:
Connect-ExchangeOnline -Credential $credespecially in unattended scripts, those will need to be updated.
Alternatives:
- Interactive sign-in
- App-only authentication (recommended for automation)
- Managed Identity (for Azure automation)
65
Upvotes
View all comments
Show parent comment
2
u/Fallingdamage Feb 17 '26
I jumped past all those layers and moved all my scripts to Graph. Started using App registrations and Certificate auth with Invoke-MgWebRequest.
I was anxious about it at first but its been really decent. Have not had to touch any AI to do any of it. Most documentation is good enough.