Skip to content

Commit d58cfdd

Browse files
authored
add a step
1 parent 2165df4 commit d58cfdd

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

support/entra/entra-id/app-integration/serilog-protected-web-api-authentication-authorization-errors.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Use Serilog to troubleshoot protected Web API authentication or authorization errors
33
description: Provides a sample web API application to troubleshoot Microsoft Entra protected Web API authentication or authorization errors using Serilog logs.
4-
ms.date: 04/28/2025
4+
ms.date: 05/07/2025
55
ms.service: entra-id
66
ms.custom: sap:Developing or Registering apps with Microsoft identity platform
77
ms.reviewer: bachoang, v-weizhu
@@ -52,6 +52,21 @@ Change the following information in the `AzureAd` section in the **appsettings.j
5252

5353
Change the `ValidAudiences` and `ValidIssuers` properties of the [TokenValidationParameters](/dotnet/api/microsoft.identitymodel.tokens.tokenvalidationparameters) class in the **Program.cs** file.
5454

55+
### Step 4: Configure Serilog
56+
57+
Configure Serilog in the `Serilog` section in the **appsettings.json** file as follows:
58+
59+
```json
60+
"Serilog": {
61+
"MinimumLevel": {
62+
"Default": "Information",
63+
"Override": {
64+
"Microsoft": "Debug",
65+
"Microsoft.Hosting.Lifetime": "Information"
66+
}
67+
},
68+
```
69+
5570
## Set up logging for JwtBearer events
5671

5772
Here's the sample Program.cs file that shows how to set up logging for the preceding events:

0 commit comments

Comments
 (0)