onedrive

How to utilize code flow for OneDrive API?

主宰稳场 提交于 2019-12-23 02:28:41
问题 How to allow my C# apps (non- forms , non- web based ) application authenticate & interact with OneDrive? (That is to say, completely programmatically.) So far: -Application registered, have client id & secret. -Enabled both web & phone. -Personal, not Business. -Client token flow appears to be for interactive, so using code . -Tried the OneDrive SDK, but it just kept saying it couldn't authenticate (not why). -Now hand-rolling requests. As web client code: async Task<string>

C# UWP LiveSKD and OneDrive access using FileOpenPicker

☆樱花仙子☆ 提交于 2019-12-22 18:27:20
问题 I'm developing a Universal Windows Platform app that allows a user to open and edit files using the FileOpenPicker. The idea is that the user can choose any file on their computer, including files located in their OneDrive folders. On Windows 10 Desktop, this is working perfectly. However, on a Windows Phone 10 device, the result is very different. When a user chooses a file with the picker, the file is downloaded to a local storage folder, and the user is able to edit the file. But when the

OneDrive Copy Item using Microsoft Graph SDK - GatewayTimeout at 10 seconds if ~>38mb file

你。 提交于 2019-12-22 10:47:06
问题 I am using the MS Graph .net SDK. Attempting to copy a sharepoint document library to another sharepoint document library. If the file is approximately 38mb, a GatewayTimeout exception is thrown for an unknown error. Either MS has a bug, or I am doing something incorrectly. Here is my code: HttpRequestMessage hrm = new HttpRequestMessage(HttpMethod.Post, request.RequestUrl); hrm.Content = new StringContent(JsonConvert.SerializeObject(request.RequestBody), System.Text.Encoding.UTF8,

Upload new file to onedrive using microsoft graph c# asp.net

徘徊边缘 提交于 2019-12-22 07:07:19
问题 Trying to upload a file to onedrive that does not already exist. I have managed to get it to update an existing file. But can't seem to figure out how to create a brand new file. I have done this useing the Microsoft.Graph library. Here is the code that works to update an existing file: public async Task<ActionResult> OneDriveUpload() { string token = await GetAccessToken(); if (string.IsNullOrEmpty(token)) { // If there's no token in the session, redirect to Home return Redirect("/"); }

MS Graph, daemon app 401 unauthorized on Files.ReadWrite.All calls

北城以北 提交于 2019-12-22 04:10:31
问题 UPDATE: I've received notice from Microsoft that this problem is a bug in the Graph API. They're working on a solution. I'm using the new v2.0 OAuth flow to authenticate my app for use with Microsoft Graph to make it able to list any users files, download and upload files in any users OneDrive and set permissions to files. This without the user being logged in, that is running it as a service account/daemon. I've set up a new "Converged application" in the new Application Registration Portal.

How to get admin access to files for all user's OneDrive

我的梦境 提交于 2019-12-22 03:21:23
问题 I am tenant admin for our Office 365 deployment. we have our internal system which need to access all OneDrive sites. We are using my tenant admin credential to get the OAuth token and trying to get files from all OneDrive sites using SharePoint/OneDrive REST API with that OAuth token. With OAuth token of the tenant admin, we are only able to get the files owned by tenant admin or Shared with tenant admin. we are not able to get the files form other user's OneDrive. Same result with Microsoft

Anonymously uploading to a publicly shared folder on OneDrive

空扰寡人 提交于 2019-12-22 01:37:54
问题 What is the REST API call to anonymously upload to a publicly shared folder on OneDrive? I have tried sharing a folder both thru the OneDrive Web UI creating a link attributed with: "Anyone with this link can edit this item", and using the REST API: POST https://graph.microsoft.com/v1.0/drives/{driveId}/items/{sharedFolderId}/createLink Content-type: application/json { "type": "edit", "scope": "anonymous" } In both cases, I can read from the shared folder without logging on by GET https://api

Microsoft Graph API Resource not found when access workbook of onedrive

僤鯓⒐⒋嵵緔 提交于 2019-12-21 22:54:06
问题 I'm building a application that connects to OneDrive for personal Microsoft account via the Graph API.My goal is to make a application from that i can access ondrive workbook content. For reference document i am using this document : https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/excel here i have 2 questions: Que 1: https://graph.microsoft.com/{version}/me/drive/items/{id}/workbook/ for this link i am using v1.0 for {version} and for {id} i am using "7FA7C48C26BC284B!114"

Onedrive API vs LiveSDK

僤鯓⒐⒋嵵緔 提交于 2019-12-21 07:06:25
问题 I am developing for WP8.1 and probably will port on other platforms. I want to integrate a OneDrive functionality, however, I can't understand what is the difference between LiveSDK (from NuGet packages) and OneDrive API. It seems that Microsoft does not communicate at all regarding that, I really don't understand why. As far as I understood, the LiveSDK is the old one and will be replaced by OneDrive API , but the LiveSDK seems so much simpler to use that I can't understand their logic... On

How to simply access SkyDrive, write and read files?

杀马特。学长 韩版系。学妹 提交于 2019-12-21 02:54:13
问题 I want to use SkyDrive to backup some information. But seems they have removed this namespace Microsoft.Live.Controls; from the new SDK, and all code samples and also answers here are outdated. this reference also is outdated; there is no more LiveConnectClient How can I simply backup files to SkyDrive after these changes? (any code sample or reference is appreciated.) 回答1: It's not that hard, but there really are no references or tutorials. Everything that's below works just fine in my