Exchange Online PowerShell time out

Joel Classic 21 Reputation points
2021-11-10T15:53:22.103+00:00

Hello - When trying to launch "Exchange PowerShell Online using "Connect-ExchangeOnline". I am getting an error "Cloud Shell has been idle for 20 minutes or you have manually exited.
Would you like to reconnect?" Any idea on how to resolve this issue?

P.S: I have "exited" and used different browsers but the same outcome. Moreover, I have not spent 20 minutes using this tool.

148189-image.png

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
643 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
{count} votes

Accepted answer
  1. Michelangelo 111 Reputation points
    2021-11-11T07:50:44.637+00:00

    EDIT: the issue has been solved on Microsoft side. Probably it involved a wrong pwsh executable path in the online shell (notice the 7-preview in the pwsh path shown below).

    This is the error causing the premature exit of the shell

    /opt/microsoft/powershell/7-preview/pwsh: symbol lookup error: /opt/microsoft/powershell/7-preview/libmi.so: undefined symbol: SSL_library_init

    obtained via a subshell

    148430-2021-11-11-azure-cloud-shell.png

    See also this Powershell issue here:
    SSL connection does not work on Debian 10

    EDIT: the proposed solution from Microsoft is not needed anymore as the issue disappeared.


3 additional answers

Sort by: Most helpful
  1. Rich Matheisen 45,091 Reputation points
    2021-11-10T19:13:33.893+00:00

    Are you using MFA (Multi Factor Authentication)? If so, I think you'll need the "Exchange Online PowerShell Module" (EXO).

    connect-exchange-online-using-mfa


  2. Michelangelo 111 Reputation points
    2021-11-10T23:19:17.497+00:00

    I am not sure your answer applies to the cloud shell. The link you posted dates back in 2019. I faced this issue just today and my MFA status has not changed in a while. It's possible that something in Exchange auth has changed - it's like the Exchange Online module exits prematurely and in doing so terminates the shell.
    To sum up: just after entering "connect-EXOPSSession' Azure cloud shell exits with the following message "Cloud Shell has been idle for 20 minutes or you have manually exited.
    Would you like to reconnect?"

    This behavior is reproducible throughout different browsers and tenants.

    0 comments No comments

  3. Joel Classic 21 Reputation points
    2021-11-17T10:45:20.517+00:00

    Hey guy - This did the trick ~> /opt/microsoft/powershell/7/pwsh. After running this command, I am able to connect to exchange online once again. Thanks for all your help.