When a custom probe is specified in an Azure Resource Manager template that includes custom matching status codes to consider the backend pool as healthy, the Custom probe matching checkbox in the portal remains unchecked; when checked, the status codes defined in the ARM template do not appear in the portal UI, although it does appear that Application Gateway is using the provided status codes.
Here's an example of the match condition for a probe in a template:
"match": {
"statusCodes": ["200-399", "401"]
}