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
1
vote
2 answers

PHP cURL creates empty file name only (0 bytes) - not transferring actual file

I'm using a File Type input to pass FormData ($_FILES['files']) to PHP via Ajax My PHP cURL looks like this: $headers = array( "Authorization: Bearer " . , "Host: graph.microsoft.com", "Content-Type: multipart/form-data", …
1
vote
1 answer

PHP CURL file upload being saved to Sharepoint instead of OneDrive

I've come across a really weird (and a little alarming) problem. I'm using Microsoft's sample users to test my integration - in this case Diego Siciliani I'm using a File Type input to pass FormData to PHP via Ajax The file upload gets saved to the…
1
vote
1 answer

Can't get the list of worksheets in a workbook stored in sharepoint using microsoft-graph-api

I'm not able to get the list of worksheets in a workbook for some reason. this might be related to my other issue which is can't add records in a excel table this is the full error message that is returned to me when calling this endpoint:…
chip
  • 3,039
  • 5
  • 35
  • 59
1
vote
2 answers

How to permanently get the OneDrive API download address

https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/permission_delete?view=odsp-graph-online Note: The @microsoft.graph.downloadUrl value is a short-lived URL and can't be cached. The URL will only be available for a short period of…
1
vote
1 answer

Unable to retrieve user's mysite URL OneDrive explorer javascript problem

I have some strange problem with onedrive explorer: https://github.com/OneDrive/onedrive-explorer-js I have configured my app credentials, have added the permissions: Files.Read Files.Read.All offline_access profile Sites.Read.All User.Read and get…
1
vote
1 answer

How to download file (InputStream) from Microsoft graph APIs?

I am following Graph APIs to download a file from Sharepoint. I tried this endpoint: https://graph.microsoft.com/v1.0/drives/{drive_id}/root:/{folder}/{file_name}:/content And to fetch InputStream using restTemplate: HttpHeaders httpHeaders = new…
1
vote
0 answers

Microsoft graph Account upgrade is required to create shareable links

I am creating the shareable links through Microsoft Graph API by following this documentation https://learn.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http The response I am getting…
1
vote
2 answers

Sharepoint : create a new file in a specific drive with graph API

In order to create a new file in a drive (a simple text file with some content), I try to call an API with MS Graph. PUT /sites/{site-id}/drive/items/{parent-id}:/{filename}:/content The drive where I want to put the file is name "myFolder" and has…
1
vote
0 answers

OneDrive - ETag does not match current item's value

Monday: My OneDrive integration has suddenly stopped working today, yielding an ETag error. Note that I am not uploading/writing - simply reading. Here is the error from reading a directory. (no changes in user permission since it was working last…
1
vote
1 answer

MS GRAPH FieldValueSet for Updating a Person Field with graph .NET API

I tried to update a Person filed named "CurrentAssignedTo" like so: var fieldValueSet = new FieldValueSet { AdditionalData = new Dictionary(){ {"CurrentQueue", "Editor"},{"JobStatus", $"Questions answered by…
1
vote
1 answer

How to get response header in c# Microsoft graph api request

I am trying to do File Copy operation in c# .net core using Microsoft graph API. It is an asynchronous operation, and by doc, it says it returns a location in the response header to check the status of the operation, Now the issue is I need its…
1
vote
1 answer

Uploading file to onedrive using microsoft graph api

I am trying to uploading a video file to onedrive using the microsoft graph api with the php sdk implementation in laravel. Code details as below // Get the access token from the cache $tokenCache = new TokenCache(); $accessToken =…
1
vote
2 answers

How does one create an empty Excel workbook via API?

I'm trying to create an empty Excel workbook in OneDrive using the Microsoft Graph API. I've tried a variety of requests but OneDrive does not pick up that it is Excel just based on the extension. The only examples I've found are C# SDK examples and…
1
vote
1 answer

getting a "Resource not found for the segment " for the file when uploading a file to sharepoint site using graph API

I need to upload a file to a list of a custom site in SharePoint. I have used graph Rest API according to the following URL. https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http But I'm getting following…
1
vote
1 answer

How to upload pdf file to Sharepoint site using MicrosoftGraph

I'm trying to transfer a pdf stored on a mobile device to a Sharepoint site using Microsoft Graph API. The file is read as a base64 string and this string is set as the content of a file on the site. I have been successful in transferring plain…