It is important that PowerShell supports OAuth when accessing the Exchange Online management console. If you get an error message such as “New Exopssession: Create Powershell Session is Failed using OAAuth”, then you should verify that the PowerShell module supports OAuth.
You must have the appropriate permissions and account to use the new-exopssession cmdlet. For example, if the exchange online management console is set to use Windows authentication, the new-exopssession command will fail to connect. When the new-exopssession cmdlet is run, it will prompt for a user name and password. It will then connect with the Exchange Online PowerShell Server. This step requires administrator privileges.