Hi Team,
I have scheduled an automation job to suspend/delete users based on their last sign-in. I am fetching last Sign-ins from Azure Log analytics.
I am getting below error intermittently. Some times it completes within 32 mins without any issue and some time it stopped with below message.
Error -
"The job has been stopped because it reached the fair share limit of job execution more than 3 hours. For long-running jobs, it's recommended to use a Hybrid Runbook Worker. Hybrid Runbook Workers don't have a limitation on how long a runbook can execute. Refer https://docs.microsoft.com/en-us/azure/automation/automation-runbook-execution#fair-share for more details."
Below are the few Azure commands i am using -
1. Connect-AzureAD
2. Connect-azurermaccount
3. Get-AzureADUser
4. Create users batch of 2000
5. Invoke-AzureRmOperationalInsightsQuery -WorkspaceId "WorkspaceID" -Query $query -ErrorAction Stop -wait 360
The job usually connect with Azure and AzureRM but it stuck while fetching the last sign-in logs from Azure log analytics.
What could be the issue? Is it required to use Hybrid Runbook Workers here? Any clue?
More Information -
1. Azure Automation Account - Region North EU
2. Azure Log Analytics - Region West EU
Thanks
Ajay

