|
2 | 2 | The ADAL for node.js library makes it easy for node.js applications to authenticate to AAD in order to access AAD protected web resources. It supports 3 authentication modes shown in the quickstart code below. |
3 | 3 |
|
4 | 4 | ## Versions |
5 | | -Current version - 0.1.22 |
| 5 | +Current version - 0.1.23 |
6 | 6 | Minimum recommended version - 0.1.22 |
7 | 7 | You can find the changes for each version in the [change log](https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/blob/master/changelog.txt). |
8 | 8 |
|
9 | 9 | ## Samples and Documentation |
10 | 10 |
|
11 | | -[We provide a full suite of sample applications and documentation on GitHub](https://github.com/AzureADSamples) to help you get started with learning the Azure Identity system. This includes tutorials for native clients such as Windows, Windows Phone, iOS, OSX, Android, and Linux. We also provide full walkthroughs for authentication flows such as OAuth2, OpenID Connect, Graph API, and other awesome features. |
| 11 | +[We provide a full suite of sample applications and documentation on GitHub](https://github.com/azure-samples?q=active-directory) to help you get started with learning the Azure Identity system. This includes tutorials for native clients such as Windows, Windows Phone, iOS, OSX, Android, and Linux. We also provide full walkthroughs for authentication flows such as OAuth2, OpenID Connect, Graph API, and other awesome features. |
12 | 12 |
|
13 | 13 | ## Community Help and Support |
14 | 14 |
|
@@ -106,15 +106,15 @@ See the [client credentials sample](https://github.com/MSOpenTech/azure-activedi |
106 | 106 | var adal = require('adal-node').AuthenticationContext; |
107 | 107 |
|
108 | 108 | var authorityHostUrl = 'https://login.windows.net'; |
109 | | -var tenant = 'myTenant'; |
| 109 | +var tenant = 'myTenant.onmicrosoft.com'; // AAD Tenant name. |
110 | 110 | var authorityUrl = authorityHostUrl + '/' + tenant; |
111 | | -var clientId = 'yourClientIdHere'; |
112 | | -var clientSecret = 'yourAADIssuedClientSecretHere' |
113 | | -var resource = '00000002-0000-0000-c000-000000000000'; |
| 111 | +var applicationId = 'yourApplicationIdHere'; // Application Id of app registered under AAD. |
| 112 | +var clientSecret = 'yourAADIssuedClientSecretHere'; // Secret generated for app. Read this environment variable. |
| 113 | +var resource = '00000002-0000-0000-c000-000000000000'; // URI that identifies the resource for which the token is valid. |
114 | 114 |
|
115 | 115 | var context = new AuthenticationContext(authorityUrl); |
116 | 116 |
|
117 | | -context.acquireTokenWithClientCredentials(resource, clientId, clientSecret, function(err, tokenResponse) { |
| 117 | +context.acquireTokenWithClientCredentials(resource, applicationId, clientSecret, function(err, tokenResponse) { |
118 | 118 | if (err) { |
119 | 119 | console.log('well that didn\'t work: ' + err.stack); |
120 | 120 | } else { |
|
0 commit comments