|
| 1 | +--- |
| 2 | +title: Capture SSL Traffic with Fiddler |
| 3 | +description: Introduces how to make Fiddler to capture SSL traffic in two specific scenarios. |
| 4 | +ms.service: entra-id |
| 5 | +ms.date: 04/15/2025 |
| 6 | +ms.reviewer: bachoang, v-weizhu |
| 7 | +ms.topic: how-to |
| 8 | +ms.custom: sap:Enterprise Applications |
| 9 | +--- |
| 10 | +# Capture SSL traffic with Fiddler |
| 11 | + |
| 12 | +This article provides instructions to use Fiddler to capture Secure Sockets Layer (SSL) traffic to troubleshoot Microsoft Entra apps. |
| 13 | + |
| 14 | +## Scenario 1: Capture Node.js web traffic with Fiddler |
| 15 | + |
| 16 | +To capture Node.js web application traffic using Fiddler, you need to proxy Node.js requests through Fiddler. The default proxy is 127.0.0.1:8888. To do so, before running the `npm start` command to start the Node.js server, enable the proxy settings by running the following commands: |
| 17 | + |
| 18 | +```nodejs |
| 19 | +set https_proxy=http://127.0.0.1:8888 |
| 20 | +set http_proxy=http://127.0.0.1:8888 |
| 21 | +set NODE_TLS_REJECT_UNAUTHORIZED=0 |
| 22 | +``` |
| 23 | + |
| 24 | +> [!NOTE] |
| 25 | +> To find out which port Fiddler is listening on, select **Tools** > **Options** > **Connections** from the Fiddler menu. |
| 26 | +
|
| 27 | +## Scenario 2: Capture the Azure Key Vault secrets client (from Azure SDK for .NET) with Fiddler |
| 28 | + |
| 29 | +To capture Azure Key Vault traffic using Fiddler, set Fiddler as a proxy by setting the `http_proxy` and `https_proxy` environment variables in the application code as follows: |
| 30 | + |
| 31 | +```csharp |
| 32 | + |
| 33 | +using Azure.Identity; |
| 34 | +using Azure.Security.KeyVault.Secrets; |
| 35 | +... |
| 36 | +// add these lines in your method to call Azure Key Vault |
| 37 | +Environment.SetEnvironmentVariable("HTTP_PROXY", "http://127.0.0.1:8888"); |
| 38 | +Environment.SetEnvironmentVariable("HTTPS_PROXY", "http://127.0.0.1:8888"); |
| 39 | + |
| 40 | +var client = new SecretClient(new Uri(keyVaultUrl), credential); |
| 41 | +KeyVaultSecret result = client.GetSecret("MySecret"); |
| 42 | +``` |
| 43 | + |
| 44 | +[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)] |
0 commit comments