"Micro delay applied" warning or delays when you run scripts and cmdlets in Exchange Online

Applies to: Exchange Online

PROBLEM


When you run scripts or cmdlets while you're connected to Microsoft Exchange Online through remote PowerShell, you experience one or more of the following symptoms:
  • Scripts or cmdlets take a long time to run.
  • You see the following throttling warning message in Exchange Online PowerShell:
    WARNING: Micro delay applied. Actual delayed: <X> msecs, ...
    WARNING: Micro delay applied. Actual delayed: <X> msecs, Enforced

CAUSE


This behavior is by design. It was put in place to prevent malicious or unintentional attacks against the service that could affect Service Level Agreements.

WORKAROUND


To work around this behavior, do one of the following:
  • Ignore the warning message. You can safely do this, as this behavior is by design.
  • Add the following sleep element to the script or cmdlet. Doing this slows the script or cmdlet to within the boundaries of the throttling limitation.
    Start-Sleep -m <Time in milliseconds> 
    In the following example, a variable is created that retrieves all mailboxes and that performs an action against them. This is a call that is typically throttled.
    $MB=get-mailbox -resultsize unlimited 
    $MB | %{Set-Mailbox $_.identity -CustomAttribute8 "Test"; Start-Sleep -m 500} 
  • Contact Office 365 Support and request that the throttling limit be adjusted. This may require a business justification.

MORE INFORMATION


Still need help? Go to Microsoft Community.