You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample demonstrates how to use [MSAL Node](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node) to sign-in a user and acquire an access token for a protected resource such as Microsoft Graph in an Electron desktop application using the [authorization code grant with PKCE](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow) flow.
17
17
18
+
This sample backs the following articles on Microsoft Docs:
19
+
20
+
-[Quickstart: Acquire a token and call Microsoft Graph API from a desktop application](https://learn.microsoft.com/azure/active-directory/develop/desktop-app-quickstart?pivots=devlang-nodejs-electron)
21
+
-[Tutorial: Sign in users and call the Microsoft Graph API in an Electron desktop app](https://learn.microsoft.com/azure/active-directory/develop/tutorial-v2-nodejs-desktop)
22
+
18
23
> :information_source: Looking for a TypeScript implementation? See: [ElectronTestApp](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/ElectronTestApp)
19
24
20
25
> :information_source: Looking for an Electron with React implementation? See: [ElectronReactTestApp](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-node-samples/ElectronReactTestApp)
21
26
27
+
> :warning: This sample does not implement persistent caching. See [Caching with MSAL Node](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/caching.md) for more information.
28
+
22
29
## Features
23
30
24
31
This sample demonstrates the following **MSAL Node** concepts:
25
32
26
-
* Configuration
27
-
* Login and logout
28
-
* Acquiring an access token
29
-
* Calling a web API
33
+
- Configuration
34
+
- Login and logout
35
+
- Acquiring an access token
36
+
- Calling a web API
30
37
31
38
## Contents
32
39
@@ -45,8 +52,8 @@ This sample demonstrates the following **MSAL Node** concepts:
45
52
46
53
### Prerequisites
47
54
48
-
*[Node.js](https://nodejs.org/en/) must be installed to run this sample.
49
-
*[Visual Studio Code](https://code.visualstudio.com/download) is recommended for running and editing this sample.
55
+
-[Node.js](https://nodejs.org/en/) must be installed to run this sample.
56
+
-[Visual Studio Code](https://code.visualstudio.com/download) is recommended for running and editing this sample.
50
57
51
58
### Register and Setup the application
52
59
@@ -68,7 +75,7 @@ This sample demonstrates the following **MSAL Node** concepts:
68
75
1. Select **Add optional claim**:
69
76
1. Select **optional claim type**, then choose **ID**.
70
77
1. Select the optional claim **login_hint**.
71
-
> An opaque, reliable login hint claim. This claim is the best value to use for the login_hint OAuth parameter in all flows to get SSO.See $[optional claims](https://docs.microsoft.com/azure/active-directory/develop/active-directory-optional-claims) for more details on this optional claim.
78
+
> An opaque, reliable login hint claim. This claim is the best value to use for the login_hint OAuth parameter in all flows to get SSO.See $[optional claims](https://docs.microsoft.com/azure/active-directory/develop/active-directory-optional-claims) for more details.
72
79
1. Select **Add** to save your changes.
73
80
74
81
#### Step 2: Clone the repository
@@ -80,12 +87,8 @@ Clone this repository `git clone https://github.com/Azure-Samples/ms-identity-ja
80
87
1. Open the [.authConfig.js](./App/authConfig.js) file and provide the required configuration values.
81
88
1. Replace the string `Enter_the_Application_Id_Here` with your app/client ID on Azure AD portal.
82
89
1. Replace the string `Enter_the_Tenant_Info_Here` with your tenant ID on Azure AD portal.
83
-
1. Replace the string `Enter_the_Cloud_Instance_Id_Here` with `https://login.microsoftonline.com/` (see **note** below).
84
-
1. Replace the string `Enter_the_Graph_Endpoint_Here`. with `https://graph.microsoft.com/` (see **note** below).
85
-
86
-
> :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/authentication-national-cloud)
87
-
88
-
> :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)
90
+
1. Replace the string `Enter_the_Cloud_Instance_Id_Here` with `https://login.microsoftonline.com/` (include the trailing slash).
91
+
1. Replace the string `Enter_the_Graph_Endpoint_Here`. with `https://graph.microsoft.com/` (include the trailing slash).
0 commit comments