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
- Samples to learn more about authentication using `MSAL`libraries:
43
-
-[Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)
44
-
-[ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)
45
-
-[ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)
32
+
-[Samples and tutorials](#samples-and-tutorials)
33
+
- Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:
34
+
-[Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
35
+
-[Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
36
+
-[Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
37
+
-[Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
38
+
-[Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
39
+
-[Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)
40
+
- Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:
- Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`:
43
+
-[LargeFileUploadTask Samples](samples/)
44
+
- Samples to learn more about authentication using `MSAL`libraries:
45
+
-[Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)
46
+
-[ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)
47
+
-[ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)
46
48
-[Questions and comments](#questions-and-comments)
47
49
-[Contributing](#contributing)
48
50
-[Additional resources](#additional-resources)
@@ -162,22 +164,27 @@ For more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions
162
164
## Samples and tutorials
163
165
164
166
Step-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph:
165
-
-[Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
166
-
-[Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
167
-
-[Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
168
-
-[Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
169
-
-[Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
170
-
-[Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)
167
+
168
+
-[Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
169
+
-[Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
170
+
-[Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
171
+
-[Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
172
+
-[Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
173
+
-[Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)
171
174
172
175
The Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more:
173
-
-[Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)
The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API:
177
+
-[Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)
-[Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`](samples/) The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API:
177
184
178
-
-[Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)
179
-
-[Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)
180
-
-[Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)
185
+
-[Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)
186
+
-[Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)
187
+
-[Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)
Copy file name to clipboardExpand all lines: docs/TokenCredentialAuthenticationProvider.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,7 @@
6
6
7
7
-[npm - Azure Identity client library for JavaScript](https://www.npmjs.com/package/@azure/identity)
8
8
9
-
- Check the [tokenCredentialSamples folder](../samples/tokencredentialsamples). The ClientSecretCredentialFlow is an example of using TokenCredential to authenticate a node application. The AuthenticationCodeFlow is an example of using TokenCredential to authenticate a browser application.
10
-
11
-
**Important Note:** TokenCredentials can be used to authenticate browser and node applications.
9
+
- Check the [javascript](../samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider/index.js) and [typescript](../samples/typescript/clientInitialization/tokenCredentialAuthenticationProvider/index.ts)`TokenCredentialAuthenticationProvider` samples . The ClientSecretCredentialFlow is an example of using TokenCredential to authenticate a node application. **Important Note:** TokenCredentials provides support for multiple authentication flows. This includes support to authenticate server applications.
12
10
13
11
###### Example of how to create and pass a token credential -
- To create the LargeFileUploadTask object you need to create -
51
-
- An upload session as shown above.
52
-
- A `FileObject` instance.
50
+
- First, you will need to initialize a [Client instance](../CreatingClientInstance.md). This `client` instance should passed as a parameter when creating the `LargeFileUploadTask` or `OneDriveLargeFileUploadTask` object.
51
+
- To create the LargeFileUploadTask object you need to create - - An upload session as shown above. - A `FileObject` instance.
53
52
54
53
**FileObject Interface**
55
54
@@ -185,3 +184,11 @@ _Returns the largeFileUpload session information containing the URL, expiry date
0 commit comments