-
Couldn't load subscription status.
- Fork 233
Microsoft Graph JavaScript SDK V3.0 Upgrade Guide
Roina Atieno Ochieng edited this page May 12, 2021
·
1 revision
- Microsoft Graph JS SDK requires Node.js 10 LTS or higher.
- Updated to TypeScript 4.x.
- Modified the
FileObjectinterface which now contains thesliceFilefunction. Learn more LargeFileUploadTask. - The
FileObjectinstance passed on creation of theLargeFileUploadTaskobject should contain the implementation of thesliceFilefunction. - Added new classes
FileUploadandStreamUploadimplementing theFileObjectinterface.
- Recommended way is to cancel a request by passing a signal.
{
"main": "lib/src/index.js",
"module": "lib/es/src/index.js",
"browser": {
"./lib/es/src/index.js": "./lib/es/src/browser/index.js"
}
}-
graph-es-sdk.js- the bundled file in ES format will not be shipped anymore as the ES modules are being shipped. -
graph-js-sdk.jswill be shipped as is.
- Files in
lib/eshave been moved tolib/es/src. Thelibfolder contains the transpiledsrcfiles.- The
libcontains the ES and CJS modules as follows:
lib │ └─── src (CJS modules) | │ └─── es |___ src (ES modules) - The
-
Range:src/Rangechanged tosrc/tasks/FileUploadTask/Range. -
ImplicitMSALAuthenticationProvider:-
src/ImplicitMSALAuthenticationProviderchanged tosrc/authentication/msal/ImplicitMSALAuthenticationProvider. - Alternatively,
ImplicitMSALAuthenticationProvidercan be imported or required from@microsoft/microsoft-graph-client/authProviders/msal.
-
-
MSALAuthenticationProviderOptions:-
src/MSALAuthenticationProviderOptionschanged tosrc/authentication/msal/MSALAuthenticationProviderOptions. - Alternatively,
MSALAuthenticationProviderOptionscan be imported or required from@microsoft/microsoft-graph-client/authProviders/msal.
-
- Added a
TokenCredentialAuthenticationProviderenabling the use of@azure/identitycredential classesfor authentication purposes. - The
TokenCredentialAuthenticationProviderenables server-side authentication usingcredential classessuch asClientSecretCredentialorClientCertificateCredential. - Find the samples on how to use
TokenCredentialAuthenticationProviderhere - TokenCredentialAuthenticationProvider samples
- Added support for Node.js Stream upload. Learn more LargeFileUploadTask.
- Added capabilities to track the upload progress using
UploadEventHandlers. - Resolved a bug to enable large file uploads to Outlook and Print APIs.
- The
browserfield indicates the entry point for client applications using Microsoft Graph JS SDK library.
-
GraphClientErrorhandles client-side errors encountered within the JavaScript Client SDK whereas,GraphErrorclass should be used to handle errors in the response from the Graph API.
- Use of
ImplicitMSALAuthenticationProvider, that is,using the implicit authorization flow is not recommended any more. OAuth 2.0 Implicit Grant. - Alternatives to
ImplicitMSALAuthenticationProvider-- TokenCredentialAuthenticationProvider with the
azure/identitylibrary. Learn more about InteractiveBrowserCredential - A CustomAuthenticationProvider with an auth library of your choice. Choose a Microsoft Graph authentication provider based on scenario
- TokenCredentialAuthenticationProvider with the
- The
sliceFilefunction has been moved to theFileObjectinterface.