Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneDrive download item not working #5

Open
E3Solutions opened this issue Dec 8, 2016 · 1 comment
Open

OneDrive download item not working #5

E3Solutions opened this issue Dec 8, 2016 · 1 comment

Comments

@E3Solutions
Copy link

Trying to download a file. This sample code has been working, now all of the sudden it is throwing an error:

using (var stream = await this.oneDriveClient.Drive.Items[item.Id].Content.Request().GetAsync())
using (var outputStream = new System.IO.FileStream(dialog.FileName, System.IO.FileMode.Create))
{
await stream.CopyToAsync(outputStream);
}

Error:
Exception of type 'Microsoft.Graph.ServiceException' was thrown.
Error Code: itemNotFound

This has sort of been up and down today (12/8/16). It has been working randomly, but most of the time down.

Please advise.

@burnsy88
Copy link

burnsy88 commented Dec 9, 2016

We have the same problem using the C#/.NET SDK with ItemNotFound error and 'Microsoft.Graph.ServiceException'. This started after MS did an update to OneDrive on 12/7. We opened a support ticket with O365/OneDrive team. They said they are not aware of any issues from rollout and said we needed to contact API support. The weird thing is it works sometimes, maybe 2 out of 100 tries. Listing files and uploading still work but downloads fail.

Here's what we have tried so far:
•Latest sample project from GitHub, same error
•Check settings in SharePoint for new settings that may affect this,none found
•Re-register the App in Azure AD
•Increased app permissions in Azure AD
. Variations in Content Request Code

The line of code that fails is:

var stream = await this.oneDriveClient.Drive.Items[item.Id].Content.Request().GetAsync();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants