onedrive

Is there a way to retrieve the meta for a deleted Item (File/Folder) for Office365 OneDrive through REST API?

百般思念 提交于 2019-12-01 08:14:06
I'm looking for a way to retrieve the meta for a deleted item(file/folder). I'm able to get change logs indicating that a certain action has been performed on an Item, and I've been able to retrieve the Item itself as well if it hasn't been deleted. The problem arises when this item gets deleted. In that case, I only know the ID of the Item and when I query the Item itself, I get a 404 (saying object has been deleted). Recently, I read the following posts http://office.microsoft.com/en-001/windows-sharepoint-services-help/view-restore-or-delete-items-in-the-recycle-bin-of-a-sharepoint-site

Download large files from OneDrive using Microsoft Graph SDK

廉价感情. 提交于 2019-12-01 07:27:58
问题 I am trying to download files from OneDrive using below Microsoft Graph call: using (var strm = await client.Drives[RemoteDriveId].Items[Id].Content.Request().GetAsync()) { byte[] byteBuffer = new byte[4096]; filePath = System.IO.Path.Combine(folderPath, filename); using (System.IO.FileStream output = new FileStream(filePath, FileMode.Create)) { int bytesRead = 0; do { bytesRead = contentStream.Read(byteBuffer, 0, byteBuffer.Length); if (bytesRead > 0) { output.Write(byteBuffer, 0, bytesRead)

List folder contents of 'Shared with Me' folder from Office 365 OneDrive (Sharepoint) for Business and Education using the REST api?

时光总嘲笑我的痴心妄想 提交于 2019-12-01 00:34:23
Is there a way to get the contents of the 'Shared with Me' folder from the Office 365 (Sharepoint) REST api ? I can't see anything in the api reference reagrding this. https://msdn.microsoft.com/office/office365/APi/files-rest-operations Found the solution to this... Instead of using the files api you must use the sharepoint search api. The following endpoint with the KQL query parameters can be used to get a list of files 'shared with me' https://{tenant}-my.sharepoint.com/_api/search/query?querytext='(SharedWithUsersOWSUSER:{UserAccountName} AND contentclass:STS_ListItem

Tenant does not have a SPO license

China☆狼群 提交于 2019-11-30 23:55:41
I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file. I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I got an error while using the access token to call the OneDrive API. Here is the response: { "error": { "code": "BadRequest", "message": "Tenant does not have a SPO license.", "innerError": { "request-id": "5ec31d17-3aea-469f-9078-de3608f11d0d", "date": "2017-10-10T04:34:05" } } } I don't understand why I need to have SPO license while calling graph

Microsoft office 365 Groups: Guest user are unable to do drive call using graph endpoint [closed]

穿精又带淫゛_ 提交于 2019-11-30 20:58:00
Our application reads group drive content by doing Get call on the drive item. This used to work fine for both internal members and guest users. Its working now for internal members but not working anymore for guest users. Following is the sample call. https://graph.microsoft.com/v1.0/drives/b!uey_5Lpf8Eu0-5HlGvJvFga89s_hTxNAg9kSsTlOBqajRqOF3ec-Rp6uqtbLNt4w/items/016GMDDVB74LSDDYRHHRHJ5KV5HHVXWQTT ?$select=webUrl,name The response we get is this { "error": { "code": "unauthenticated", "message": "Role Claim does not exist for Service Asserted App V1.", "innerError": { "request-id": "5ed31bd5

List folder contents of 'Shared with Me' folder from Office 365 OneDrive (Sharepoint) for Business and Education using the REST api?

▼魔方 西西 提交于 2019-11-30 19:18:08
问题 Is there a way to get the contents of the 'Shared with Me' folder from the Office 365 (Sharepoint) REST api ? I can't see anything in the api reference reagrding this. https://msdn.microsoft.com/office/office365/APi/files-rest-operations 回答1: Found the solution to this... Instead of using the files api you must use the sharepoint search api. The following endpoint with the KQL query parameters can be used to get a list of files 'shared with me' https://{tenant}-my.sharepoint.com/_api/search

OneDrive - Wrong size for PNG files

荒凉一梦 提交于 2019-11-29 18:08:56
When uploading certain PNG files the size is incorrectly reported on the OneDrive website and in the Photo object returned by the REST API. This can be reproduced using the following PNG file: http://www2.zippyshare.com/v/11270772/file.html The file size is 20.3 KB , OneDrive displays it as 38.4 KB It seems this only happens with PNG files that would be downsized/converted when the downsize_photo_uploads query param is absent or set to true. But the problem is not just limited to uploads using the REST API. The problem has been already been reported here . Ryan from OneDrive here. We looked

Trigger java code to download file from onedrive when file is uploaded to onedrive

我的梦境 提交于 2019-11-29 18:07:58
I want to trigger a java code residing as an image in Azure container registry or docker hub. This code is to download/read file from onedrive when file is been uploaded to onedrive. I tried azure services like Azure logic apps but there is no action to trigger java code. I tried using restapi but couldnt identify the URL to use for GET request. I read about microsoft graph api but I dont have to use it as I have to make it generic in case in future file path changes from onedrive to any other drive. Here are the steps which you need to follow: 1) You will create a logic app which will have

Resumable upload returns Unauthorized when uploading chunk

亡梦爱人 提交于 2019-11-29 17:20:14
Today I have a problem with the resumable upload feature of OneDrive via the Microsoft Graph API, as described here . I have integration tests which previously worked, which now fail. I successfully call createUploadSession and get an uploadUrl to use. I've replaced actual tokens with "XXX" here. POST https://graph.microsoft.com/V1.0/groups/273c2c33-8533-445d-ae65-4b63be296995/drive/root:/c2fa1a83-74f3-444b-9263-c9539ee3eae2.txt:/createUploadSession HTTP/1.1 Authorization: Bearer XXX { "item": { "@microsoft.graph.conflictBehaviour": "replace" } } Response: { "@odata.context": "https://graph

OneDrive for Business API item/file download content 401

旧城冷巷雨未停 提交于 2019-11-29 16:39:54
My question seems similar to OneDrive for Business REST API - PUT,POST - 401 Unauthorized However, instead of uploading, I am trying to download a file. What's strange is that I do get the file contents and data, but the response code is a 401. Any idea why? Of course, I would like to be receiving a 200 and not have to ignore the response code. As far as my Azure AD app permissions go, I am allowing pretty much all read permissions under delegated permissions for Office 365. I have listed all the permissions I selected here, for your reference. Delegated Permissions I am allowing for Office