ability to filter our 401 Failed Requests in Application Insights
When monitoring an application that uses NT Auth 401 request failures are expected because it is part of the authentication process. But it makes it really hard to find real failed requests because their are so many 401 failures in the failed request section.

8 comments
-
jose commented
En realidad no gestionado a profundidad la aplicación para hacer una sugerencia necesito profundizar Mary conocerla bien para conocer sus aspectos para sugerir
-
James Jensen commented
Since this seems to have been largely ignored, I'm posting a workaround. You can create a TelemetryInitializer, similar to that described in [this SO post](https://stackoverflow.com/questions/35207433/ignore-specific-http-status-codes-from-errors), but instead of request telemetry watch for DependencyTelemetry with a 401 code and set the Success property to true.
-
Jaime Bennett commented
Is there any update on this issue? We've tried to filter these 401 out within our application startup.cs but this lead to issues. These really are not failures and should not be treated as such. Reporting this as failures makes the weekly application insights digest emails useless.
-
Harlow Burgess commented
Please do not confuse this with a feature request for custom filtering. This is reporting a bug in the Failed Requests tile. Returning a 401 status code as part of a challenge response is NOT a failed request. It is a successful request returning the expected response. Whoever decided that "status code >= 400" means "failed request" obviously was not aware of this fact. Please correct this oversight.
-
Brandon Colston commented
I would also like the ability to filter out 401 or any status code. The ability to configure an alert by status codes would also be amazing.
-
Per Bornsjö commented
I think Application Insight shouldn't log 401 errors that's part of chalange response authentication.
Theese are not "errors", they are part of the login mechanics.Please make this configurable.
-
Guillaume commented
We need an easy way to filter out request (failed or not) from all stats and for everybody. For instance with federated authentication : SingleSignOut, 401 that is part of SingleSignOn...
In competitor solutions, there is often a way to filter out errors before they are sent or logged. -
Dennis Pan commented
Thanks for the feedback. What you can currently do is open Search then perform a search that filters out those 401. For example, if all NT Auth 401 includes ‘Auth’ in the event name or properties, then you can search for ‘401 NOT Auth’. With next release, you will also be able to pin this search to start board, so that you can easily access it without opening the app and re-perform the Search. This document describes the expressions supported for search: http://azure.microsoft.com/en-us/documentation/articles/app-insights-diagnostic-search/. Hope this helps.