To upload reports from ServiceNow to Sharepoint using microsoft graph

Niranjani1
Tera Contributor

Hi All,

Currenlty, I am working on establishing connection between ServiceNow and SharePoint using microsoft graph.I am currently struck with setting up the endpoint point to upload files in Folder.Can anyone please help me with the format.

 

I tried with below URL format but it wasn't successful,

1 REPLY 1

nityabans27
Giga Guru

Hi @Niranjani1 ,

Try this
PUT https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root:/{filename}:/content

For uploading into a subfolder (e.g. Shared Documents/Invoices):

PUT https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root:/Shared Documents/Invoices/{filename}:/content