Skip to content

Commit 5ba85f5

Browse files
author
derisen
committed
update msal
1 parent a735e85 commit 5ba85f5

File tree

5 files changed

+100
-69
lines changed

5 files changed

+100
-69
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ CLIENT_ID=Enter_the_Application_Id_Here
44
CLIENT_SECRET=Enter_the_Client_Secret_Here
55

66
# Endpoints
7-
AAD_ENDPOINT=Enter_the_Cloud_Instance_Id_Here
8-
GRAPH_ENDPOINT=Enter_the_Graph_Endpoint_Here
7+
AAD_ENDPOINT=Enter_the_Cloud_Instance_Id_Here ## include the trailing slash
8+
GRAPH_ENDPOINT=Enter_the_Graph_Endpoint_Here ## include the trailing slash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This sample demonstrates the following **MSAL Node** concepts:
5252
4. Replace the string `Enter_the_Cloud_Instance_Id_Here` with `https://login.microsoftonline.com/` (see **note** below).
5353
5. Replace the string `Enter_the_Graph_Endpoint_Here`. with `https://graph.microsoft.com/` (see **note** below).
5454

55-
> :information_source: *note*: This is for multi-tenant applications located on the global Azure cloud. For more information, see: [Use MSAL in a national cloud environment](https://docs.microsoft.com/azure/active-directory/develop/quickstart-v2-javascript-auth-code)
55+
> :information_source: *note*: This is for multi-tenant applications located on the global Azure cloud. For more information, see: [Use MSAL in a national cloud environment](https://docs.microsoft.com/azure/active-directory/develop/msal-national-cloud?tabs=javascript)
5656
5757
> :information_source: *note*: This is for MS Graph instance located on the global Azure cloud. For more information, see: [Use Microsoft Graph in a national cloud environment](https://docs.microsoft.com/graph/deployments)
5858

bin/auth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const msalConfig = {
1515

1616
/**
1717
* With client credentials flows permissions need to be granted in the portal by a tenant administrator.
18-
* The scope is always in the format '<resource>/.default'. For more, visit:
18+
* The scope is always in the format '<resource-appId-uri>/.default'. For more, visit:
1919
* https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
2020
*/
2121
const tokenRequest = {
22-
scopes: [process.env.GRAPH_ENDPOINT + '.default'],
22+
scopes: [process.env.GRAPH_ENDPOINT + '.default'], // e.g. 'https://graph.microsoft.com/.default'
2323
};
2424

2525
const apiConfig = {
26-
uri: process.env.GRAPH_ENDPOINT + 'v1.0/users',
26+
uri: process.env.GRAPH_ENDPOINT + 'v1.0/users', // e.g. 'https://graph.microsoft.com/v1.0/users'
2727
};
2828

2929
/**

package-lock.json

Lines changed: 90 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"author": "",
1010
"license": "MIT",
1111
"dependencies": {
12-
"@azure/msal-node": "^1.0.0",
13-
"dotenv": "^8.2.0",
14-
"yargs": "^16.2.0"
12+
"@azure/msal-node": "^1.9.1",
13+
"axios": "^0.27.2",
14+
"dotenv": "^16.0.1",
15+
"yargs": "^17.5.1"
1516
}
1617
}

0 commit comments

Comments
 (0)