お世話になっております。
AzureAutomation上でPoserShellを実行し、ユーザのMFA設定を変更するスクリプトを運用しております。
8/18 14:00~15:00の間に、connect-msolservice のコマンドレットでタイムアウトエラーが発生しました。
▼発生したエラー
Connect-MsolService : The request channel timed out attempting to send after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have
been a portion of a longer timeout. At line:22 char:5 + Connect-MsolService -Credential $credObject + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Connect-MsolService], TimeoutException + FullyQualifiedErrorId
: System.TimeoutException,Microsoft.Online.Administration.Automation.ConnectMsolService
▼実行したコマンド(抜粋)
#Input information for running AzureMFA on Runbook.
Param
(
[Parameter (Mandatory= $true)]
[string] $Users,
[Parameter (Mandatory= $true)]
[string] $register,
[Parameter (Mandatory= $true)]
[string] $company_judge_flag,
[Parameter(Mandatory=$true)]
[string] $Operation
)
try{
#Connect to MsolService.
$credObject = Get-AutomationPSCredential -Name 'MSOnline'
Connect-MsolService -Credential $credObject
$ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $credObject -Authentication Basic -AllowRedirection
Import-PSSession -Session $ExSession -DisableNameChecking:$true -AllowClobber:$true | Out-Null
}catch{
Write-Error("モジュール承認処理でエラー発生")
Write-Output "Azure error"
exit
}
当該時以降の実行ではタイムアウトエラーは発生していないのですが、
再発防止のための原因調査 / 対策を行いたく、お力添えいただきたく存じます。
以上、よろしくお願いいたします。