Exchange Online PowerShell Error Messages
The ExchangeOnlineManagement module: mailboxes, permissions, transport and mail flow in Microsoft 365.All Exchange Online PowerShell pages
- Connect-ExchangeOnline: AADSTS53003: Access has been blocked by Conditional Access policiesEntra ID refused a token to Exchange Online PowerShell because a Conditional Access policy blocks the sign-in. Find that policy in the Entra sign-in logs.
- Connecting to remote server outlook.office365.com failed with the following error message : Access is deniedNew-PSSession scripts with Basic auth no longer work: remote PowerShell was retired. Install ExchangeOnlineManagement and use Connect-ExchangeOnline now.
- The operation couldn't be performed because object 'user@contoso.com' couldn't be found on (Exchange Online)Exchange Online cannot resolve the -Identity value: a typo, a user without a mailbox, a recipient not yet synced, or the wrong cmdlet for the recipient type.
- The proxy address "SMTP:user@contoso.com" is already being used by the proxy addresses or LegacyExchangeDNAnother Exchange Online recipient already holds that email address. Find it with Get-EXORecipient filtered on EmailAddresses, remove it there and retry.
- The term 'Get-Mailbox' is not recognized as the name of a cmdlet (Exchange Online PowerShell)In the EXO V3 module, Get-Mailbox and Set-Mailbox exist only after Connect-ExchangeOnline. Connect first; if it still fails, your RBAC roles lack the cmdlet.
- You must call Connect-ExchangeOnline before calling any other cmdlet.Get-EXOMailbox and the other Get-EXO cmdlets fail with this message when no Exchange Online session exists. Run Connect-ExchangeOnline first, then retry.