onedrive

VBA download a File from OneDrive

血红的双手。 提交于 2019-12-24 05:45:14
问题 I am trying to download a file from OneDrive. I am new to API Concepts and here is Code, Sub OneDrive_Download() 'Declare the Object Dim oRequest As Object 'Create and Assign Object Set oRequest = CreateObject("MSXML2.XMLHTTP") 'Input User OneDrive URL URL = "https://xxxx-my.sharepoint.com/personal/sidxxx_ie/" 'Post the URL in the Object oRequest.Open "POST", URL, False 'Send Keys to the API oRequest.send ("{""client_id"":myclientid,""CLIENT_SECRET"":myclientsecret}") 'Print the Response in

users?$expand=drive fails with InternalServerError

ぐ巨炮叔叔 提交于 2019-12-24 01:42:51
问题 We want to be able to include the information about each individual user's personal site (OneDrive for Business) within a collection, to avoid inefficient subsequent requests to Microsoft Graph. Microsoft Graph API doesn't allow to query for the mySite field when getting a user collection via /users?$select=id,mail,mySite . This fact is documented in the Graph API docs. Thus we were looking for an alternative, and came across: GET /users?$expand=drive or GET /users?$expand=drives because

MS Graph API Unknown Error when trying to get folder's children

女生的网名这么多〃 提交于 2019-12-24 00:48:59
问题 When trying to access a specific folder in my sharepoint site's drive using the Microsoft Graph API relative pathing I get an unknown error. This exact same request worked fine just over a week ago but stopped working this week when using it again. Test Results is a folder on my site's drive. According to OneDrive dev docs this is how the request should look: /drive/root:/path/to/folder:/children Actual Request (site-id removed): https://graph.microsoft.com/v1.0/sites/<site-id>/drive/root:

How to specify @microsoft.graph.conflictBehavior in the request body in onedriveAPI

不问归期 提交于 2019-12-24 00:22:14
问题 I'm working on a C# project with these requirements: Create a Folder if it doesn't exits Check if the already exists, if it exists increment the file name. From Onedrive API documentation Create a new Folder in OneDrive, it says that setting @microsoft.graph.conflictBehavior=rename would increment the folder value if it exists how can I add the @microsoft.graph.conflictBehavior into my request? Here's the code which creates the folder using drive Item var foldertoCreate = new DriveItem { Name

System.IO.FileNotFoundException: Could not load assembly System.Web in Mono for Android

风格不统一 提交于 2019-12-23 18:45:58
问题 I'm building an android app with Xamarin that uses SkyDrive .Net API Client but I'm getting the following error when trying to run my android app on the emulator Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'System.Web.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono

How to download files from OneDrive by authenticating using Get-Credentials using power shell?

我的未来我决定 提交于 2019-12-23 15:08:14
问题 Here is the code I am using right now, it has been tested working to download a file, however if there is authentication required such as one drive, I am not able to authenticate and download the file. The code I have is here: $CheckFile = Test-Path "$PSScriptRoot\5.2.0\Content Manager Setup.exe" if ($CheckFile) {exit} else {$colorscheme = (Get-Host).PrivateData $colorscheme.ProgressBackgroundColor = "black" $colorscheme.ProgressForegroundColor = "red" Function MakingProgress { param(

Sharepoint `Unsupported segment type` when checkin/chekout file

那年仲夏 提交于 2019-12-23 09:20:35
问题 I'd like to use the checkout/checkin feature on the OneDrive REST API : https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_checkout I'm facing two issues: 1st issue - the file info API returns publication property as published , even the file is manually checked out Request: https://graph.microsoft.com/v1.0/sites/SITE_ID/drive/items/FILE_ID?select=name,id,publication Response: { "id": "01KJOOXJHF77OPSR7HWVCKSTHBQJQZEBJI", "name": "diamond.mmap", "publication": { "level

List children API doesn't give all the children of the drive/folder

核能气质少年 提交于 2019-12-23 03:41:38
问题 I am facing the following issue while getting files/folders for OneDrive of a user. On hitting https://graph.microsoft.com/v1.0/users/{user-id}/drive I get this in the response: "quota": { "deleted": 0, "remaining": 0, "total": 0, "used": 0 } which denotes that the drive isn't being used or is empty. On hitting https://graph.microsoft.com/v1.0/users/{user-id}/drive/root I get the response - "folder": { "childCount": 21 }, "root": {}, "size": 281236319 Here, it denotes that there are 21 files

Microsoft Graph API - Resumable upload returns 404 when uploading chunk [duplicate]

自古美人都是妖i 提交于 2019-12-23 03:36:07
问题 This question already has answers here : Resumable upload returns Unauthorized when uploading chunk (2 answers) Closed 2 years ago . Following the answer to this question I removed my Authorization header when uploading the first chunk of my resumable upload. So creating the session: POST https://graph.microsoft.com/V1.0/groups/a0aab702-8e58-4f25-b2dd-066e5d110f0c/drive/root:/10cb244a-d181-44df-aabc-51c30d4cf0f5.txt:/createUploadSession HTTP/1.1 Authorization: Bearer XXX Content-Type:

Microsoft Graph CSharp SDK and OneDrive for Business with a Service/Daemon application - Quota facet returns null

别说谁变了你拦得住时间么 提交于 2019-12-23 03:33:42
问题 I am coding against Microsoft Graph CSharp SDK for OneDrive for Business and I am trying to pull back data on a specific User and request back Quota information. My request: var user = await graphServiceClient.Users["test@test.onmicrosoft.com"].Request().GetAsync(); var drive = await graphServiceClient.Drives["test@test.onmicrosoft.com"].Request().GetAsync(); var quotaTotal = drive.Quota.Used; var displayName = user.DisplayName; var driveType = drive.DriveType; var driveId = drive.Id; The