Dear The_Exchange_Team,
We're trying to use the EXO V3.1.0 module in an Azure Automation runbook.
But we are facing the following strange problem.
---
1. Connect to EXO with the command below.
Connect-ExchangeOnline -AppId $AppId -CertificateThumbPrint $CertificateThumbPrint -CommandName $CommandNameList -Organization $Organization -ErrorAction Stop
2. Execute any cmdlet. For example, "Get-EXOCASMailbox".
3. The cmdlet returns the following exception.
Exception:Microsoft.Exchange.Management.RestApiClient.RestClientException: You must call Connect-ExchangeOnline before calling any other cmdlet. at Microsoft.Exchange.Management.RestApiClient.AdminCmdlet`2.get_AuthProvider() at Microsoft.Exchange.Management.RestApiClient.AdminCmdlet`2.<ProcessRecord>b__34_1() at Microsoft.Online.CSE.RestApiPowerShellModule.Instrumentation.Activity.LogLatencyIfExceedingThreshold[T](String stageName, Func`1 func, UInt64 threshold) at Microsoft.Exchange.Management.RestApiClient.AdminCmdlet`2.<ProcessRecord>b__34_0() at Microsoft.Exchange.Management.RestApiClient.AdminCmdlet`2.ExecuteWithExceptionHandling(Action action, Exception& exception)
4. But just after the above exception, "Get-ConnectionInformation" returns below.
State : Connected
TokenStatus : Active
---
This happens occasionally, but not every time.
Is this a bug?
We would like you to let me know if you have any information.