Skip to content

Commit c33dd7a

Browse files
authored
Update MSAL4J logging documentation for clarity
Edit review per CI 3604
1 parent 04e2761 commit c33dd7a

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

support/entra/entra-id/app-integration/enable-msal4j-logging-spring-boot-webapp.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Enable MSAL4J logging in a Spring Boot web application in Microsoft Entra ID
3-
description: Describes how to enable MSAL4J logging in a Spring Boot web application in Microsoft Entra.
2+
title: Enable MSAL4J Logging in a Spring Boot Web Application in Microsoft Entra ID
3+
description: Discusses how to enable MSAL4J logging in a Spring Boot web application in Microsoft Entra.
44
ms.date: 03/10/2025
55
ms.author: bachoang
66
ms.service: entra-id
@@ -9,15 +9,15 @@ ms.custom: sap:Microsoft Entra App Integration and Development
99

1010
# Enable MSAL4J logging in a Spring Boot web application
1111

12-
This article provides step-by-step instructions on how to enable [Microsoft Authentication Library for Java](https://github.com/AzureAD/microsoft-authentication-library-for-java) (MSAL4J) logging by using the [Logback framework](https://logback.qos.ch/) in a Spring Boot web application.
12+
This article provides step-by-step instructions to enable [Microsoft Authentication Library for Java](https://github.com/AzureAD/microsoft-authentication-library-for-java) (MSAL4J) logging by using the [Logback framework](https://logback.qos.ch/) in a Spring Boot web application.
1313

1414
## Code sample
1515

1616
The complete code sample and configuration guide for this implementation are available on [GitHub](https://github.com/bachoang/MSAL4J_SpringBoot_Logging/tree/main/msal-b2c-web-sample).
1717

1818
## Enable MSAL4J logging
1919

20-
1. Add the following dependency to your pom.xml file to include the Logback framework:
20+
1. Add the following dependency to your Pom.xml file to include the Logback framework:
2121

2222
```xml
2323
<dependency>
@@ -27,7 +27,7 @@ The complete code sample and configuration guide for this implementation are ava
2727
</dependency>
2828
```
2929

30-
2. In your app project, create a new file named **logback.xml** in the **src/main/resources** folder and add the following content:
30+
2. In your app project, create a file that's named **Logback.xml** in the **src/main/resources** folder, and then add the following content:
3131

3232
```xml
3333
<?xml version="1.0" encoding="UTF-8"?>
@@ -43,8 +43,8 @@ The complete code sample and configuration guide for this implementation are ava
4343
</configuration>
4444
```
4545

46-
This Appender configuration logs messages to the console. You can adjust the logging level to `error`, `warn`, `info`, or `verbose` based on your preference. For more information, see [LogBack: Appenders](https://logback.qos.ch/manual/appenders.html)
47-
3. Set the **logging.config** property to the location of the **logback.xml** file before the main method:
46+
This Appender configuration logs messages to the console. You can adjust the logging level to `error`, `warn`, `info`, or `verbose` based on your preference. For more information, see [LogBack: Appenders](https://logback.qos.ch/manual/appenders.html).
47+
3. Set the **logging.config** property to the location of the **Logback.xml** file before the main method:
4848

4949
```java
5050
@SpringBootApplication
@@ -65,14 +65,14 @@ The complete code sample and configuration guide for this implementation are ava
6565

6666
### Enable HTTPs support
6767

68-
his code sample is set up to run on the local server (localhost) using the HTTPS protocol. Follow [Configure the sample to use your Azure AD B2C tenant](https://github.com/bachoang/MSAL4J_SpringBoot_Logging/tree/main/msal-b2c-web-sample#step-2--configure-the-sample-to-use-your-azure-ad-b2c-tenant) to generate a self-signed certificate and place the **keystore.p12** file in the resources folder.
68+
This code sample is set up to run on the local server (localhost) by using the HTTPS protocol. Follow the steps in [Configure the sample to use your Azure AD B2C tenant](https://github.com/bachoang/MSAL4J_SpringBoot_Logging/tree/main/msal-b2c-web-sample#step-2--configure-the-sample-to-use-your-azure-ad-b2c-tenant) to generate a self-signed certificate. Put the **keystore.p12** file in the resources folder.
6969

7070
### App registration configuration
7171

72-
Follow these steps to configure app registration in Azure AD B2C:
72+
To configure app registration in Azure AD B2C, follow these steps:
7373

7474
1. Create two app registrations in your Azure AD B2C tenant: One for the web application and the other for the web API.
75-
2. Expose the required scope in the web API. Refer to [this documentation](/azure/active-directory-b2c/configure-authentication-sample-web-app-with-api?tabs=visual-studio#step-22-configure-web-api-app-scopes) for guidance on exposing web API scopes.
75+
2. Expose the required scope in the web API. Refer to the guidance in ["Configure web API app scopes"](/azure/active-directory-b2c/configure-authentication-sample-web-app-with-api?tabs=visual-studio#step-22-configure-web-api-app-scopes) for more information.
7676
3. Configure the web API scope in the **API Permissions** blade for the web application.
7777
4. Grant admin consent to all configured permissions in the web application.
7878

@@ -84,8 +84,6 @@ Example configuration:
8484

8585
## Logging output example
8686

87-
When the app is configured correctly, the logging output should resemble the following:
88-
87+
If the app is configured correctly, the logging output should resemble the following:
8988

9089
:::image type="content" source="media/enable-msal4j-logging-spring-boot-webapp/log-sample.png" alt-text="Diagram that shows logging output." border="true" lightbox="media/enable-msal4j-logging-spring-boot-webapp/log-sample.png":::
91-

0 commit comments

Comments
 (0)