Skip to content

Commit f6d061c

Browse files
authored
Update java webapp quickstart steps for ready-to-go downloaded sample (Do not merge)
1 parent 9fe44c4 commit f6d061c

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

articles/active-directory/develop/quickstart-v2-java-webapp.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,15 @@ ms.custom: aaddev, scenarios:getting-started, languages:Java
1616

1717
# Quickstart: Add sign-in with Microsoft to a Java web app
1818

19-
[!INCLUDE [active-directory-develop-applies-v2](../../../includes/active-directory-develop-applies-v2.md)]
20-
2119
In this quickstart, you'll learn how to integrate a Java web application with the Microsoft identity platform. Your app will sign in a user, get an access token to call the Microsoft Graph API, and make a request to the Microsoft Graph API.
2220

23-
When you've completed this quickstart, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) and work or school accounts from any company or organization that uses Azure Active Directory.
24-
25-
![Shows how the sample app generated by this quickstart works](media/quickstart-v2-java-webapp/java-quickstart.svg)
21+
When you've completed this quickstart, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) and work or school accounts from any company or organization that uses Azure Active Directory. (See [How the sample works](#how-the-sample-works) for an illustration.)
2622

2723
## Prerequisites
2824

2925
To run this sample you will need:
3026

3127
- [Java Development Kit (JDK)](https://openjdk.java.net/) 8 or greater, and [Maven](https://maven.apache.org/).
32-
- An Azure Active Directory (Azure AD) tenant. For more information on how to get an Azure AD tenant, see [How to get an Azure AD tenant](https://azure.microsoft.com/documentation/articles/active-directory-howto-tenant/).
3328

3429
> [!div renderon="docs"]
3530
> ## Register and download your quickstart app
@@ -80,32 +75,39 @@ To run this sample you will need:
8075
> > ![Already configured](media/quickstart-v2-aspnet-webapp/green-check.png) Your application is configured with these attributes.
8176
8277
#### Step 2: Download the code sample
78+
> [!div renderon="docs"]
79+
> [Download the Code Sample](https://github.com/Azure-Samples/ms-identity-java-webapp/archive/master.zip)
8380
84-
[Download the Code Sample](https://github.com/Azure-Samples/ms-identity-java-webapp/archive/master.zip)
85-
86-
#### Step 3: Configure the code sample
87-
88-
1. Extract the zip file to a local folder.
89-
1. If you use an integrated development environment, open the sample in your favorite IDE (optional).
90-
91-
1. Open the application.properties file, which can be found in src/main/resources/ folder and replace the value of the fields *aad.clientId*, *aad.authority* and *aad.secretKey* with the respective values of **Application Id**, **Tenant Id** and **Client Secret** as the following:
92-
93-
```file
94-
aad.clientId=Enter_the_Application_Id_here
95-
aad.authority=https://login.microsoftonline.com/Enter_the_Tenant_Info_Here/
96-
aad.secretKey=Enter_the_Client_Secret_Here
97-
aad.redirectUriSignin=http://localhost:8080/msal4jsample/secure/aad
98-
aad.redirectUriGraph=http://localhost:8080/msal4jsample/graph/me
99-
```
81+
> [!div class="sxs-lookup" renderon="portal"]
82+
> Download the project and extract the zip file to a local folder closer to the root folder - for example, **C:\Azure-Samples**
83+
> [!div renderon="portal" id="autoupdate" class="nextstepaction"]
84+
> [Download the code sample]()
10085
10186
> [!div renderon="docs"]
87+
> #### Step 3: Configure the code sample
88+
>
89+
> 1. Extract the zip file to a local folder.
90+
> 1. If you use an integrated development environment, open the sample in your favorite IDE (optional).
91+
> 1. Open the application.properties file, which can be found in src/main/resources/ folder and replace the value of the fields *aad.clientId*, *aad.authority* and *aad.secretKey* with the respective values of **Application Id**, **Tenant Id** and **Client Secret** as the following:
92+
>
93+
> ```file
94+
> aad.clientId=Enter_the_Application_Id_here
95+
> aad.authority=https://login.microsoftonline.com/Enter_the_Tenant_Info_Here/
96+
> aad.secretKey=Enter_the_Client_Secret_Here
97+
> aad.redirectUriSignin=http://localhost:8080/msal4jsample/secure/aad
98+
> aad.redirectUriGraph=http://localhost:8080/msal4jsample/graph/me
99+
> ```
100+
>
102101
> Where:
103102
>
104103
> - `Enter_the_Application_Id_here` - is the Application Id for the application you registered.
105104
> - `Enter_the_Client_Secret_Here` - is the **Client Secret** you created in **Certificates & Secrets** for the application you registered.
106105
> - `Enter_the_Tenant_Info_Here` - is the **Directory (tenant) ID** value of the application you registered.
107106
108-
#### Step 4: Run the code sample
107+
> [!div class="sxs-lookup" renderon="portal"]
108+
> #### Step 3: Run the code sample
109+
> [!div renderon="docs"]
110+
> #### Step 4: Run the code sample
109111
110112
To run the project, you can either:
111113
@@ -126,6 +128,9 @@ If you are running the web application from an IDE, click on run, then navigate
126128
127129
## More information
128130
131+
### How the sample works
132+
![Shows how the sample app generated by this quickstart works](media/quickstart-v2-java-webapp/java-quickstart.svg)
133+
129134
### Getting MSAL
130135
131136
MSAL for Java (MSAL4J) is the Java library used to sign in users and request tokens used to access an API protected by the Microsoft identity Platform.

0 commit comments

Comments
 (0)