@maykoncapellari/msgraph-sharepoint

1.0.7 • Public • Published

ms-graph-sharepoint

Microsoft Graph module to helps upload files to sharepoint

Installing

Install globally:

npm install -g @maykoncapellari/msgraph-sharepoint

Using

Import in NodeJS script:

import { MsGraphService } from '@maykoncapellari/msgraph-sharepoint';

const msService = new MsGraphService({ ...params });
await msService.signIn();
// Will read '~/attachmentsDir/myfile.pdf' and put on 'me/drive/root/My Sharepoint Docs/myfile.pdf' on sharepoint
await msService.uploadFile({ attachmentsDir: '~/attachmentsDir', folderName: 'My Sharepoint Docs', file: 'myfile.pdf' });
const profile = await msService.requestGraphGet('me'); // Get my profile data
await msService.logout();

Package Sidebar

Install

npm i @maykoncapellari/msgraph-sharepoint

Weekly Downloads

6

Version

1.0.7

License

MIT

Unpacked Size

20.8 kB

Total Files

7

Last publish

Collaborators

  • maykoncapellari