Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains how to filter traffic that's captured by Fiddler using domain/host names owned by Microsoft Entra and client processes.
Prerequisites
Before filtering, ensure that Fiddler is configured to capture traffic for all processes. In the lower-left corner of the Fiddler window, you can select All processes to change the selection.
Filter traffic using Fiddler's built-in filter feature
To filter traffic using Fiddler's built-in filter feature, follow these steps:
Open Fiddler and navigate to the right panel.
Select the Filters tab, and then select the Use Filters checkbox.
Under the Hosts section, select Show only the following Hosts.
In the text box, enter the host name list you want to filter on, separated by semicolons, for example,
localhost;login.microsoftonline.com;graph.microsoft.com
.Note
This text box will display a yellow background while editing the list, indicating unsaved changes.
Select the Actions button to save the list. The background color will change to white, confirming the list is saved.
Under the Client Process section, you can also select a specific process to filter on. This is particularly useful for filtering a standalone application. It might be less effective for capturing browser traffic because multiple processes with the same name can make it difficult to identify the correct one.
Filter traffic using JavaScript code in the OnBeforeRequest function
Note
This option is used especially for browser-based applications.
In Fiddler, go to Rules > Customize Rules. This action will open the CustomRules.js file in the FiddlerScript editor.
Locate the OnBeforeRequest function in the FiddlerScript editor.
Insert the following JavaScript code at the beginning of the function:
// begin filter // set this to false to disable filter and true to enable filter var filterOn = true; if (filterOn) { // hide all requests by default oSession["ui-hide"] = "true"; // list of domain names to filter on var host = ["localhost", "login.microsoftonline.com", "graph.microsoft.com"]; // list of processes to filter on var processlist = ["chrome", "microsoftedgecp", "iisexpress", "powershell"]; for (var j = 0; j < processlist.length; j++) { if (oSession.LocalProcess.Contains(processlist[j])) { for (var i = 0; i < host.length; i++) { if (oSession.HostnameIs(host[i])) { oSession["ui-hide"] = null; } } } } } // end filter
Here are the explanations of some variables in the JavaScript code:
filterOn
: Set it totrue
to enable the filter andfalse
to disable it.host
: Contains the list of domain names to filter on.processlist
: Contains the list of process names to filter on.
Save the changes to the CustomRules.js file.
References
Third-party information disclaimer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.