Skip to content

Commit 7e61653

Browse files
editing console app quickstarts
1 parent 2efba87 commit 7e61653

File tree

4 files changed

+85
-149
lines changed

4 files changed

+85
-149
lines changed

articles/active-directory/develop/includes/console-app/quickstart-java.md

Lines changed: 27 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: quickstart
1111
ms.workload: identity
12-
ms.date: 12/06/2021
12+
ms.date: 01/10/2022
1313
ms.author: marsma
1414
ms.custom: aaddev, "scenarios:getting-started", "languages:Java", devx-track-java, mode-other
1515
#Customer intent: As an application developer, I want to learn how my Java app can get an access token and call an API that's protected by Microsoft identity platform endpoint using client credentials flow.
@@ -56,54 +56,35 @@ To register your application and add the app's registration information to your
5656
1. Under **User** node, select **User.Read.All**, then select **Add permissions**.
5757

5858
#### Step 2: Download the Java project
59+
[Download the Java daemon project](https://github.com/Azure-Samples/ms-identity-java-daemon/archive/master.zip)
5960

60-
> [!div renderon="docs"]
61-
> [Download the Java daemon project](https://github.com/Azure-Samples/ms-identity-java-daemon/archive/master.zip)
62-
63-
> [!div renderon="portal" id="autoupdate" class="sxs-lookup nextstepaction"]
64-
> [Download the code sample](https://github.com/Azure-Samples/ms-identity-java-daemon/archive/master.zip)
65-
66-
> [!div class="sxs-lookup" renderon="portal"]
67-
> > [!NOTE]
68-
> > `Enter_the_Supported_Account_Info_Here`
69-
70-
> [!div renderon="docs"]
71-
> #### Step 3: Configure the Java project
72-
>
73-
> 1. Extract the zip file to a local folder close to the root of the disk, for example, *C:\Azure-Samples*.
74-
> 1. Navigate to the sub folder **msal-client-credential-secret**.
75-
> 1. Edit *src\main\resources\application.properties* and replace the values of the fields `AUTHORITY`, `CLIENT_ID`, and `SECRET` with the following snippet:
76-
>
77-
> ```
78-
> AUTHORITY=https://login.microsoftonline.com/Enter_the_Tenant_Id_Here/
79-
> CLIENT_ID=Enter_the_Application_Id_Here
80-
> SECRET=Enter_the_Client_Secret_Here
81-
> ```
82-
> Where:
83-
> - `Enter_the_Application_Id_Here` - is the **Application (client) ID** for the application you registered.
84-
> - `Enter_the_Tenant_Id_Here` - replace this value with the **Tenant Id** or **Tenant name** (for example, contoso.microsoft.com).
85-
> - `Enter_the_Client_Secret_Here` - replace this value with the client secret created on step 1.
86-
>
87-
> > [!TIP]
88-
> > To find the values of **Application (client) ID**, **Directory (tenant) ID**, go to the app's **Overview** page in the Azure portal. To generate a new key, go to **Certificates & secrets** page.
89-
90-
> [!div class="sxs-lookup" renderon="portal"]
91-
> #### Step 3: Admin consent
92-
93-
> [!div renderon="docs"]
94-
> #### Step 4: Admin consent
61+
#### Step 3: Configure the Java project
62+
63+
1. Extract the zip file to a local folder close to the root of the disk, for example, *C:\Azure-Samples*.
64+
1. Navigate to the sub folder **msal-client-credential-secret**.
65+
1. Edit *src\main\resources\application.properties* and replace the values of the fields `AUTHORITY`, `CLIENT_ID`, and `SECRET` with the following snippet:
66+
67+
```
68+
AUTHORITY=https://login.microsoftonline.com/Enter_the_Tenant_Id_Here/
69+
CLIENT_ID=Enter_the_Application_Id_Here
70+
SECRET=Enter_the_Client_Secret_Here
71+
```
72+
Where:
73+
- `Enter_the_Application_Id_Here` - is the **Application (client) ID** for the application you registered.
74+
- `Enter_the_Tenant_Id_Here` - replace this value with the **Tenant Id** or **Tenant name** (for example, contoso.microsoft.com).
75+
- `Enter_the_Client_Secret_Here` - replace this value with the client secret created on step 1.
76+
77+
>[!TIP]
78+
>To find the values of **Application (client) ID**, **Directory (tenant) ID**, go to the app's **Overview** page in the Azure portal. To generate a new key, go to **Certificates & secrets** page.
79+
80+
#### Step 4: Admin consent
9581

9682
If you try to run the application at this point, you'll receive *HTTP 403 - Forbidden* error: `Insufficient privileges to complete the operation`. This error happens because any *app-only permission* requires Admin consent: a global administrator of your directory must give consent to your application. Select one of the options below depending on your role:
9783

9884
##### Global tenant administrator
9985

100-
> [!div renderon="docs"]
101-
> If you are a global tenant administrator, go to **API Permissions** page in **App registrations** in the Azure portal and select **Grant admin consent for {Tenant Name}** (Where {Tenant Name} is the name of your directory).
10286

103-
> [!div renderon="portal" class="sxs-lookup"]
104-
> If you are a global administrator, go to **API Permissions** page select **Grant admin consent for Enter_the_Tenant_Name_Here**.
105-
> > [!div id="apipermissionspage"]
106-
> > [Go to the API Permissions page]()
87+
If you are a global tenant administrator, go to **API Permissions** page in **App registrations** in the Azure portal and select **Grant admin consent for {Tenant Name}** (Where {Tenant Name} is the name of your directory).
10788

10889
##### Standard user
10990

@@ -113,16 +94,12 @@ If you're a standard user of your tenant, then you need to ask a global administ
11394
https://login.microsoftonline.com/Enter_the_Tenant_Id_Here/adminconsent?client_id=Enter_the_Application_Id_Here
11495
```
11596

116-
> [!div renderon="docs"]
117-
> > Where:
118-
> > * `Enter_the_Tenant_Id_Here` - replace this value with the **Tenant Id** or **Tenant name** (for example, contoso.microsoft.com)
119-
> > * `Enter_the_Application_Id_Here` - is the **Application (client) ID** for the application you registered.
97+
Where:
98+
* `Enter_the_Tenant_Id_Here` - replace this value with the **Tenant Id** or **Tenant name** (for example, contoso.microsoft.com)
99+
* `Enter_the_Application_Id_Here` - is the **Application (client) ID** for the application you registered.
120100

121-
> [!div class="sxs-lookup" renderon="portal"]
122-
> #### Step 4: Run the application
123101

124-
> [!div renderon="docs"]
125-
> #### Step 5: Run the application
102+
#### Step 5: Run the application
126103

127104
You can test the sample directly by running the main method of ClientCredentialGrant.java from your IDE.
128105

articles/active-directory/develop/includes/console-app/quickstart-netcore.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: quickstart
1111
ms.workload: identity
12-
ms.date: 12/06/2021
12+
ms.date: 01/10/2022
1313
ms.author: jmprieur
1414
ms.reviewer: marsma
1515
ms.custom: devx-track-csharp, aaddev, identityplatformtop40, "scenarios:getting-started", "languages:aspnet-core", mode-other
@@ -67,7 +67,7 @@ To register your application and add the app's registration information to your
6767
You can run the provided project in either Visual Studio or Visual Studio for Mac.
6868

6969

70-
[!INCLUDE [active-directory-develop-path-length-tip](../../../../../includes/active-directory-develop-path-length-tip.md)]
70+
>[!INCLUDE [active-directory-develop-path-length-tip](../../../../../includes/active-directory-develop-path-length-tip.md)]
7171
7272

7373
#### Step 3: Configure your Visual Studio project
@@ -134,11 +134,6 @@ This quickstart application uses a client secret to identify itself as a confide
134134
## More information
135135
This section gives an overview of the code required to sign in users. This overview can be useful to understand how the code works, what the main arguments are, and how to add sign-in to an existing .NET Core console application.
136136

137-
> [!div class="sxs-lookup" renderon="portal"]
138-
> ### How the sample works
139-
>
140-
> ![Diagram that shows how the sample app generated by this quickstart works.](../../media/quickstart-v2-netcore-daemon/netcore-daemon-intro.svg)
141-
142137
### MSAL.NET
143138

144139
Microsoft Authentication Library (MSAL, in the [Microsoft.Identity.Client](https://www.nuget.org/packages/Microsoft.Identity.Client) package) is the library that's used to sign in users and request tokens for accessing an API protected by the Microsoft identity platform. This quickstart requests tokens by using the application's own identity instead of delegated permissions. The authentication flow in this case is known as a [client credentials OAuth flow](../../v2-oauth2-client-creds-grant-flow.md). For more information on how to use MSAL.NET with a client credentials flow, see [this article](https://aka.ms/msal-net-client-credentials).

0 commit comments

Comments
 (0)