onedrive

Get Access Token with OneDrive API

风流意气都作罢 提交于 2020-01-25 22:00:06
问题 I am trying to authenticate and to sign to in OneDrive for business in order to get an access token. I have registered my application in Azure Active Directory and I have got my client_Id and my Client_Secret. Base on the OneDrive API Documentation the next step is to login to get the authorization code that will be used to get the access token. I am able to get the code successfully but the next step is a POST with the following parameters: POST https://login.microsoftonline.com/common

SkyDrive API - accessing documents

孤者浪人 提交于 2020-01-23 18:18:37
问题 Not a long time that SkyDrive API is available. The scopes to access are here. But how to access documents on SkyDrive? What scope to use? 回答1: This blog post about Windows 8 and Skydrive contains some information about wl.skydrive for accessing and wl.skydrive_update for uploading data. Also the SkyPad application uses these, so it might be worth a try: <live:SignInButton x:Name="signInBtn" Scopes="wl.signin wl.skydrive_update" Margin="0,0,0,0" /> 来源: https://stackoverflow.com/questions

SkyDrive API - accessing documents

自作多情 提交于 2020-01-23 18:18:06
问题 Not a long time that SkyDrive API is available. The scopes to access are here. But how to access documents on SkyDrive? What scope to use? 回答1: This blog post about Windows 8 and Skydrive contains some information about wl.skydrive for accessing and wl.skydrive_update for uploading data. Also the SkyPad application uses these, so it might be worth a try: <live:SignInButton x:Name="signInBtn" Scopes="wl.signin wl.skydrive_update" Margin="0,0,0,0" /> 来源: https://stackoverflow.com/questions

CachedFileUpdater doesn't work in OneDrive app on mobile?

落花浮王杯 提交于 2020-01-23 09:14:22
问题 There is a Cached File Updater contract which allows apps like OneDrive or DropBox to keep files in sync with remote repository when users change them though file pickers. It works roughly like this: User gets a file using FileOpenPicker. User changes file. The source app gets notification that file is changed and uploads new file to backing storage. However, while in official DropBox app this scenario works perfectly, in OneDrive app it doesn't. I'm getting UnauthorizedAccessException when

Direct download link to OneDrive file?

依然范特西╮ 提交于 2020-01-22 23:03:46
问题 A OneDrive sharable link looks like this: https://1drv.ms/w/s!AqmFiI7maXrRgT7PGcK_7JyZlBco. How do I get the direct download link version of this? I know with a onedrive.live/redir?<...> link I can just replace the 'redir' with 'download', but how do I do that for a link that looks like the one above? Thanks. 回答1: If you follow the instruction here you can generate a URL that will act on the shared item, including being able to get its content. In your case the URL would look like https://api

Office 365 - Create *.docx | *.pptx | *.xlsx files

无人久伴 提交于 2020-01-17 05:18:12
问题 I'm working on a web project which uses the OneDrive API for file management purposes. I wanted to create *.docx | *.pptx | *.xlsx files but unfortunately, none of the OneDrive APIs support creating empty/new files. What I tried was to upload an empty/new file from my server to OneDrive. While the upload works fine, the file does not open in Office Online nor in local Office. From this blog, I was able to generate a Word file and upload it. function createNewDoc(name) { var htmlString = "

Get Files in One Drive Folder Sorted By Updated Time

依然范特西╮ 提交于 2020-01-17 04:22:30
问题 I have an apps that allow user to pick an apps backups from specific folder in One Drive . I want to show only 10 files from this folder sorted by file Updated Time (DESC), I have found how to limit the files by appending limit=10 to query path. I'm using Live SDK ver 5.6.1 package from Nuget . LiveConnectClient client = new LiveConnectClient(session); var result = await client.GetAsync(string.Format("{0}/files?limit=10", folderId)); But cannot find how to sorted by Updated Time . 回答1: I'm

Microsoft Graph: Uploading files to shared with me folder on OneDrive?

不打扰是莪最后的温柔 提交于 2020-01-16 11:11:20
问题 I was able to successfully upload to Shared Documents folder using this approach. But I am looking for a way to upload files to Shared WithMe folder on OneDrive. Is it possible to upload to "/Shared WithMe" folder on OneDrive? If so, which is the right syntax for the PUT (small file) or POST (upload session)? I spent a lot of time to figure this out but no luck. Any help would be greatly appreciated. 回答1: I had success with this approach: PUT /drives/{driveid}/items/{itemid}/content I was

AddAsync(driveItem) does not return

我的梦境 提交于 2020-01-16 08:05:14
问题 The .AddAsync(driveItem) in the following code never returns. Could anyone shed some light on this? IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder .Create(App.ClientId) .Build(); DeviceCodeProvider authProvider = new DeviceCodeProvider( publicClientApplication, new string[] { "Files.ReadWrite.All" }); GraphServiceClient graphClient = new GraphServiceClient(authProvider); DriveItem driveItem = new DriveItem { Name = "Foo", Folder = new Folder { },

Is there a OneDrive API for C++?

安稳与你 提交于 2020-01-16 04:47:26
问题 I want to make a script that allows me to upload and download my files from OneDrive using C++ for a backup project I am making. I came across the REST API however I cannot seem to download it. This is what I mean. If it helps I am on a Mac running OS X Yosemite. This will also be a command line application 回答1: If you look closer at the project you'll see that the source code is there, and detailed instructions on how to build it can be found in the documentation: How to setup, build, and