Asked by:
[UWP][C#]UWP Community Toolkit OneDrive Service Error?

Question
-
Hi everybody!
I'm using UWP Community Toolkit OneDrive Service to Restore/Backup my app database.
But I get this error "failException of type 'Microsoft.Graph.ServiceException' was thrown."
How to fix it, Thank you!
- Moved by Xavier Xie-MSFT Friday, August 4, 2017 7:00 AM
Monday, July 31, 2017 11:32 AM
All replies
-
Hi Nguyen_Thanh_Liem
Could you tell me in which step you got the error? When you sign in to the service or doing other things? Could you also tell me the detail message about this error?
Please refer the guild line here: OneDrive Service, check out if you have associate your application to the store. You could also refer Registering your app for Microsoft Graph for help.
Could you please offer me a sample to reproduce your problem? You could delete all the sensitive information and just give a simple code to reproduce your issue.
Best Regards
Roy
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Tuesday, August 1, 2017 6:56 AM -
Here is my page My Code
I have Register my app with Microsoft Graph
- Edited by Nguyen_Thanh_Liem Tuesday, August 1, 2017 11:24 AM
Tuesday, August 1, 2017 11:23 AM -
I have test about your issue and reproduced the issue. I think the reason why it get exception is that your app isn’t associated with the Windows Store.
To associate your app with the Windows Store, you could refer the following steps:
- Create an Application in the Dashboard in Dev Center.
- Open your project file in VS.
- Right click your project, find Store menu and select Associate App with the Store.
- Sign in your Windows Store developer account using your Microsoft account credentials.
- Find the app you created in step.1 and click Next to see the info will add to your app.
- Click Associate if the message is correct.
Besides, I have some notices for you:
- If you get exception when create folder, please log into your OneDrive and check your RootFolder if the folder you want to create is already exist. Other files or folders are the same.
- Please ensure the App you associated is the same one which you get the App ID / Client Id from.
Best Regards
Roy
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Wednesday, August 2, 2017 10:00 AM -
I have Associate App with the Store. My first version of my app live on Store.
It's crash here
await OneDriveService.Instance.LoginAsync()
"failException of type 'Microsoft.Graph.ServiceException' was thrown."
Wednesday, August 2, 2017 11:07 AM -
I have an old app on Store has working good with OneDrive. But when I try it's now my old app get the same error. What was change with OneDrive SDKWednesday, August 2, 2017 11:53 AM
-
Sorry for the delay.
Since is related to the OneDrive SDK, I suggest that you could ask about this question in Stack Overflow . The OneDrive Team will be actively engaging with members of the Stack Overflow community and answering questions posted there.
You could refer this thread for more details: OneDrive Developer Forum Relocated to Stack Overflow
Best Regards
Roy
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Friday, August 4, 2017 6:59 AM