Questions tagged [microsoft-graph-files]

Microsoft Graph Files refers to the OneDrive and SharePoint Files APIs in Microsoft Graph. This tag should always be used in conjunction with the [microsoft-graph] tag.

204 questions
0
votes
0 answers

Get 404 "The resource could not be found" when call /beta/informationprotection/policy/labels

according to documentation we may use the following endpoints for fetching sensitivity labels: /me/informationProtection/policy/labels (using delegated permissions) /informationProtection/policy/labels (using application permission. App should…
0
votes
2 answers

Uploading Empty (0 Byte) to SharePoint Online

I'm developing a node service, that pushes file to SharePoint online. We are using the official Graph SDK for JavaScript (..and Types). so far - everything's fine, but if the folder contains a file that has 0-length, I can not find a way to push…
0
votes
2 answers

How can I get a token for Microsoft Graph to read an excel table?

What I need: I need to read an excel table from Microsoft Teams Channel with Microsoft Graph API. That is possible with the following URI: https://graph.microsoft.com/v1.0/drives/someId/items/someId/workbook/tables/tableName/rows The problem is,…
0
votes
0 answers

Experiencing arbitrary Unexpected 403 messages when uploading file with microsoft graph uploadSession

I have an android app which is uploading picture files to a sharepoint folder using Chunked upload session. Normally this is going well, but suddenly (out of the blue) i get 403 forbidden message. This may happen in the middle of attempts, where 1-5…
Roar Grønmo
  • 2,926
  • 2
  • 24
  • 37
0
votes
0 answers

Copy/Move Item api is not throwing exception when i provide invalid parentReference.id with in drive

Both Move and copy apis are successful when we provide invalid ParentReference.id with in drive. And it is copying the file to same folder as source item. Expected Behaviour : It should throw invalid parentReferece.id error. This functionality is…
0
votes
0 answers

Microsoft Graph giving "The site in the encoded share URI is invalid" when trying to access shared one note item

I am unable to get the Microsoft graph OneDrive Share API to work with OneNote documents shared from a personal Microsoft account. A URL in the format https://1drv.ms/u/s!{text} is generated when sharing a OneNote document generated by a personal…
0
votes
0 answers

Delta API appears to return incorrect parent folder id for OneDrive Business Accounts when the change is "deleted"

When a file is deleted in a OneDrive business account (consumer account works fine) the delta response for 'GET /me/drive/root/delta?token=mytoken' reports the file as deleted however the parentReference/id is incorrect and lists the root folder id…
0
votes
1 answer

How to upgrade from OneDrive SDK to Microsoft Graph SDK and keep the old AppFolder

My UWP app uses app folder (Files.ReadWrite.AppFolder) for storing app data on OneDrive. I upgraded the app to use Microsoft Graph SDK instead of the old OneDrive SDK (version 1.x). I didn't get the authentication to work using the old client id…
kine
  • 1,352
  • 2
  • 12
  • 24
0
votes
1 answer

How do I escape a Sharepoint column name in Microsoft Graph?

I'm performing the following request to update the value of "ExampleColumn#" for a Sharepoint Online item: PATCH https://graph.microsoft.com/v1.0/sites/{site_id}/lists/{list_id}/items/{item_id} With the following request body: { "fields":{ …
0
votes
0 answers

MS Graph API add permission to File

I am using MS graph API to add document to one drive and give permission to other user. I have followed this link to add permission which works as expected. All of a sudden its worked in a different way, instead of grant access to the user it…
user3141198
  • 33
  • 1
  • 7
0
votes
0 answers

Why are the thumbnails for PPTX not working in MS Graph Search

I'm using the Microsoft Graph explorer to search for PPTX files inside Sharepoint: https://graph.microsoft.com/v1.0/sites/MYSITE.sharepoint.com/drive/root/search(q = 'term AND .pptx')?$expand=thumbnails This works fine and returns results including…
Cilvic
  • 3,417
  • 2
  • 33
  • 57
0
votes
0 answers

Is it possible to consume the Search API using application token credentials?

I need to do searches within SharePoint Online document libraries either using the new Search API (https://learn.microsoft.com/en-us/graph/search-concept-overview) or using the _api/search endpoint. I've reached a dead end using the _api/search…
0
votes
1 answer

Graph File Upload API - Images are getting corrupted

When I am trying to upload image using graph EndPoint then images are getting corrupted. Endpoint - PUT https://graph.microsoft.com/v1.0/drives/{drive_id}/items/{item_id}:/{file_name}:/content Anything I am missing here? SharePoint Message When…
0
votes
1 answer

Drive item size is wrong after upload of plain text file to OneDrive

When uploading files to OneDrive for Business using the Graph API I sometimes see that the drive item has the wrong size after the PUT request. I know that OneDrive might modify Office files on the fly but I see it happening for plain text files…
tomyl
  • 11
  • 1
  • 3
0
votes
1 answer

Strange 'lastModifiedDateTime' object when requesting a sharepoint site with microsoft graph api

I am trying to detect sharepoint sites in Office 365 not visited last 180 days. With this purpose I query sharepoint sites using a microsoft graph api query like this: GET https://graph.microsoft.com/v1.0/sites?search= which returns an JSON object…