Hello @Mayank Jain ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you are unable to see some allowed API requests in your application gateway firewall logs.
As @Boris Von Dahle mentioned above, please make sure that logging is enabled via the diagnostic settings of your Application gateway for Firewall logs.
The purpose of WAF logs is to show every request that WAF matches or blocks.
If logging is enabled and a WAF rule is triggered, any matching patterns are logged in plain text to help you analyze and debug the WAF policy behavior.
Also, as mentioned in the below doc:
Allowed action is only logged when all conditions were matched for a given rule and the request was passed to the backend.
Another thing that you can check here is custom rules.
Your custom rules can either block, allow, or log requested traffic based on matching criteria. If the WAF policy is set to detection mode, and a custom block rule is triggered, the request is logged and no blocking action is taken. These rules hold a higher priority than the rest of the rules in the managed rule sets. If a custom rule is triggered, and an allow or block action is taken, no further custom or managed rules are evaluated. Custom rules can be enabled/disabled on demand.
So, if you've configured a custom rule to allow these API requests, then it will authorize the transaction, skipping all other rules. The specified request is added to the allowlist and once matched, the request stops further evaluation and is sent to the backend pool.
And in prevention mode, the allowed action of a custom rule is not logged.
Only, in detection mode, all the transaction are logged based on SecDefaultAction after which evaluation is stopped. Any request after that meets the same conditions won't be evaluated and will just be logged.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.