Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ src/**/*.d.ts

samples/**/secrets.ts
samples/**/secrets.js
samples/node/secrets.json
samples/browser/src/secrets.js
samples/browser/src/graph-js-sdk.js
samples/browser/src/graph-es-sdk.js
samples/node_modules/**
samples/lib/

test/development/secrets.ts

Expand Down
59 changes: 33 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th
- [Page Iteration](docs/tasks/PageIterator.md)
- [Getting Raw Response](docs/GettingRawResponse.md)
- [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)
- [Samples and tutorials](#samples-and-tutorials)
- Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:
- [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
- [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
- [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
- [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
- [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
- [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)
- Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:
- [TokenCredentialAuthenticationProvider Samples](samples/tokenCredentialSamples)
- Samples to learn more about authentication using `MSAL`libraries:
- [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)
- [ 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)
- [ 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)
- [Samples and tutorials](#samples-and-tutorials)
- Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:
- [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
- [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
- [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
- [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
- [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
- [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)
- Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:
- [TokenCredentialAuthenticationProvider Samples](samples/)
- Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`:
- [LargeFileUploadTask Samples](samples/)
- Samples to learn more about authentication using `MSAL`libraries:
- [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)
- [ 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)
- [ 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)
- [Questions and comments](#questions-and-comments)
- [Contributing](#contributing)
- [Additional resources](#additional-resources)
Expand Down Expand Up @@ -162,22 +164,27 @@ For more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions
## Samples and tutorials

Step-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph:
- [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
- [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
- [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
- [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
- [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
- [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)

- [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)
- [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)
- [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)
- [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)
- [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)
- [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)

The Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more:
- [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)
- [TokenCredentialAuthenticationProvider Samples](samples/tokenCredentialSamples)

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:
- [Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)
- [TokenCredentialAuthenticationProvider Samples](samples/)

The Microsoft Graph JavaScript SDK provides a `LargeFileUploadTask` to upload large files to OneDrive, Outlook and Print API:

- [LargeFileUploadTask documentation](docs/tasks/LargeFileUploadTask.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:

- [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)
- [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)
- [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)
- [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)
- [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)
- [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)

## Questions and comments

Expand Down
4 changes: 1 addition & 3 deletions docs/TokenCredentialAuthenticationProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

- [npm - Azure Identity client library for JavaScript](https://www.npmjs.com/package/@azure/identity)

- 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.

**Important Note:** TokenCredentials can be used to authenticate browser and node applications.
- 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.

###### Example of how to create and pass a token credential -

Expand Down
13 changes: 10 additions & 3 deletions docs/tasks/LargeFileUploadTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ const uploadSession = LargeFileUploadTask.createUploadSession(client, "REQUEST_U

#### Creating the LargeFileUploadTask object

- To create the LargeFileUploadTask object you need to create -
- An upload session as shown above.
- A `FileObject` instance.
- 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.
- To create the LargeFileUploadTask object you need to create - - An upload session as shown above. - A `FileObject` instance.

**FileObject Interface**

Expand Down Expand Up @@ -185,3 +184,11 @@ _Returns the largeFileUpload session information containing the URL, expiry date
```typescript
const uploadsession: LargeFileUploadSession = uploadTask.getUploadSession();
```

## Samples

Check out the samples for:

- LargeFileUploadTask - [JavaScript](../../samples/javascript/tasks/LargeFileUploadTask.js) - [Typescript](../../samples/typescript/tasks/LargeFileUploadTask.ts)

- OneDriveLargeFileUploadTask - [JavaScript](../../samples/javascript/tasks/OneDriveLargeFileUploadTask.js) - [TypeScript](../../samples/typescript/tasks/OneDriveLargeFileUploadTask.ts)
9 changes: 0 additions & 9 deletions samples/browser/.lightrc

This file was deleted.

27 changes: 0 additions & 27 deletions samples/browser/README.md

This file was deleted.

Loading