WAF policy automatically switching to Detection mode

Farzana Mustafa 81 Reputation points

We have noticed that our WAF policy is automatically switching to Detection mode from Prevention mode.

Any idea why this is happening?

Azure Web Application Firewall
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 38,051 Reputation points Microsoft Employee

    Hello @Farzana Mustafa ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you are facing issues with WAF policy automatically switching from Prevention to Detection mode.

    I informed this should not be the ideal case and suggested to check the activity logs.


    You informed us you were able to see the changes in Activity Log and the changes were indeed happening.

    However, it turns out to be one-off issue and the issue is no longer reproducible.

    Thank you for leveraging Microsoft Q&A platform.
    We value your continued contribution.



    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Priya Kumar 1,096 Reputation points Microsoft Employee

    Hello @Farzana Mustafa ,

    Thanks for reaching out to Q and A platform.

    1. The WAF will not automatically switch the Modes, unless we have performed the action on the resource.
    2. Could you pull the “activity log” in the Portal and see what the request Body shows? that should give us the PUT operation, and it'll tell us if the call included Prevention or Detection under webApplicationFirewallConfiguration>firewallMode.

    Priya Kumar