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.
Questions tagged [microsoft-graph-files]
204 questions
2
votes
0 answers
OneDrive shared folder deltas
As described in the "Remarks" section in Track changes for a Drive
In OneDrive for Business and SharePoint, delta is only supported on the root folder, not on other folders within a drive.
But when I use delta request on the root of a drive that…

chen machluf
- 51
- 2
2
votes
1 answer
Trying to delete permissions returns HTTP 403 - Operation not allowed
When trying to do a DELETE operation using this request https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{item-id}/permissions/{perm-id}, the Microsoft Graph has started returning an HTTP 403 with this body:
{
code: "notAllowed"
…

Jorgen Solberg
- 185
- 9
1
vote
1 answer
How to set permissions while uploading files using Microsoft Graph Api
I'm trying to upload a file (docx file) using graph api. I want to understand is it possible to set file level permissions (like the file should not be accessible to anyone).
I tried following the documentation but by default the file is accessible…

Sherlock
- 15
- 4
1
vote
1 answer
How to set a Term into the TaxKeyword field of a file with Microsoft Graph
I've been working with the TermStore in Microsoft Graph, using the official documentation I've managed to get a CRUD system of Terms. The whole point of the TermStore is using these terms with files, so I thought it would be also easy to add those…

martirodm
- 33
- 7
1
vote
1 answer
Not able to process and write pdf file from PDF response in java
I am trying to convert a docx into pdf, microsoft graph already provides a functionality for that but thing is I am getting a PDF in response with content type "application/pdf" as a string/text from microsoft graph. I know the response is correct…

Faizan Shaikh Sarkar
- 173
- 1
- 2
- 9
1
vote
1 answer
Trying to get OneDrive Items using Microsoft Graph
I am trying to get my drive items from OneDrive by following the code snippets in Microsoft Graph Explorer. I am using the sample app provided by Microsoft's quick start (https://developer.microsoft.com/en-us/graph/quick-start)
this is the call I am…

cmf91
- 33
- 5
1
vote
0 answers
Convert file from .doc to .docx when uploading file to SharePoint?
The Microsoft Graph Api gives users the possibility to convert files to other formats when downloading these files. The problem I am having is that I have a lot of users with old .doc files stored and these users should be able to edit these in the…

user3261212
- 391
- 2
- 15
1
vote
1 answer
Microsoft Graph SDK 5 upgrade - How to pass a FieldValueSet
I'm struggling upgrading to Microsoft SDK 5.3.0.
This code is suppose to set a value to a specific column for a DriveItem.
string key = "SomeColHeader";
string value = "Value1";
var fieldValueSet = new FieldValueSet
{
AdditionalData…

Ásgeir Gunnar Stefánsson
- 549
- 1
- 5
- 21
1
vote
1 answer
Upload a small file to Sharepoint using Microsoft Graph .NET SDK 5.0
I'm trying to rewrite this code so that it will work with the version 5.0 of the Microsoft Graph .NET SDK:
private async static Task UploadSmallFile(string driveId, string filePath, MemoryStream fileStream)
{
var queryOptions = new…

Ásgeir Gunnar Stefánsson
- 549
- 1
- 5
- 21
1
vote
0 answers
Microsoft Graph API - Error: The Content-Range header length does not match the provided number of bytes
I am trying to upload a file to the Shared Documents library of my SharePoint website. The files are of type PDF and HTML. I am running a Cold Fusion development environment and using CFHTTP commands to execute HTTP requests. I have been able push a…

wchan1097
- 11
- 2
1
vote
2 answers
I receive 403 HTTP status on "/drive/root/search(q='file-name')"
I build GraphServiceClient
final ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder()
.clientId("todo-replace-on-own")
.clientSecret("todo-replace-on-own")
…

Artur Kovalchuk
- 21
- 7
1
vote
1 answer
How to check if file locked/open via Graph API/SDK
I'm trying to delete a file in a document library (personal OneDrive) via the Graph SDK (using c#)
await graphClient.Drives[driveId].Items[driveItemId].Request().DeleteAsync();
It works. But if the file is open it'll throw this error:
423 :…

Maryna Shubna
- 21
- 3
1
vote
1 answer
How to download mail attachment through script?
I am writing a python script to fetch mail attachments through Graph API.
In the Graph Explorer, I can perfectly download file attachments by manually pressing the download button after…

lvb
- 41
- 3
1
vote
1 answer
Graph REST API - Search inside DriveItem not working for non-mainstream file extensions
I've been trying to search within a specific DriveItem folder but I've been having some troubles. First of all, despite the API stating that "You can search within a folder hierarchy, a whole drive, or files shared with the current user.", I haven't…

Cosme Benito
- 125
- 2
- 13
1
vote
0 answers
Upload a xlsx file larger than 4mb in ms graph powershell fails
It works for text files, but fails for xlsx.
it gives no error, and file is corrupted.
Not sure if the content type is correct
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor…

user24778
- 41
- 4