Priority value out of range: Exchange Online Transport Rule Deployment
0 reputation · 15 Jul 2025, 05:19 UTC
0 reputation · 15 Jul 2025, 05:19 UTC
The goal is to create a set of transport rules in Exchange Online via PowerShell with explicit priority values so that rule evaluation follows a deterministic order. Constraints include the undocumented behavior that identical priorities are resolved by creation timestamp, and that Import‑TransportRule defaults priorities to 0.
During recent deployments, the engine emits “Priority value out of range” when a priority exceeds an undocumented threshold, yet the rule still appears in Get‑TransportRule without error. Disabling and re‑enabling a rule resets its priority to the default, breaking existing chains.
34775 reputation · 15 Jul 2025, 06:49 UTC
Priority value in the order of their creation timestamp – the oldest rule (earliest Created time) is processed first.Priority parameter accepts a 32‑bit signed integer. Values in the range 0 to 2,147,483,647 are accepted without warning. Supplying 2,147,483,648 (Int32.MaxValue + 1) or any larger positive number triggers the “Priority value out of range” warning (negative values also trigger the warning). The rule is still created/updated with the supplied value, but the warning indicates the value is outside the supported range.Disable‑TransportRule resets its Priority to 0. Re‑enabling with Enable‑TransportRule does not restore the previous value. To preserve the priority, capture it before disabling and re‑apply it after enabling.Likely explanation (based on observed service behavior): The engine stores Priority as a signed 32‑bit integer and uses the Created timestamp as a tie‑breaker when sorting rules for evaluation. Future service updates could adjust the warning threshold or change the tie‑breaker logic.
Confirmed facts (verifiable today):
Get‑TransportRule | Select Name, Priority, Created shows the current priority and creation time.Disable‑TransportRule -Identity "RuleName" followed by Get‑TransportRule -Identity "RuleName" yields Priority : 0.2,147,483,648 produces a warning in the PowerShell console while the rule still appears with that priority in Get‑TransportRule.$rule = Get-TransportRule -Identity "MyRule"
$savedPriority = $rule.Priority
Disable-TransportRule -Identity "MyRule"
Enable-TransportRule -Identity "MyRule"
Set-TransportRule -Identity "MyRule" -Priority $savedPriority
Get-TransportRule -Identity "MyRule" | Select Name, Priority, Created
If you continue to see the “Priority value out of range” warning, verify that the value you are assigning is ≤ 2,147,483,647 and ≥ 0. Adjust the value accordingly and repeat the steps above.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.