UWP backup on users OneDrive

Maksim Doroshko 21 Reputation points
2020-06-28T13:11:03.713+00:00

Hi,
I want to implement OneDrive backup for UWP store application - without asking user to enter Login/Password (user already loggedin MS account). Can you point to actual(modern) tutorial how to read and write files to "onedrive.appfolder" only.

I tried multiples examples about accessing OneDrive, all of them outdated and not working:
LiveSDK
OneDriveSDK(V1,V2)
Graph - From Azure Registration portal - two sample applications settled up for registered app - not working with windows auth.
Community.Toolkit.OneDriveService (in latest builds service removed with comment -> removing old service and outdated graph implementation). I did not found modern alternative.

I got two main problems:
Authorization, most examples made for corporate SharePoint access, all examples failed to use windows auth (without login promt) with error: Can not get user information: check app have right compatibility… It is not true - I can get loggedin user info by System.User , also on first run UWP asking to get Read Account permit. I believe I have done this part using WebAccountProvider with single OneDrive app folder permition question (Scope "onedrive.appfolder") and returned Token. Interesting, but I don't need to create Azure/ App registration to get access to OneDrive App - Store association is enough. But Token doesn't wont to work with Graph or OneDriveSDK V2.
https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/WebAccountManagement

Second problem - using OneDrive to read and write folders/files - there is no clear documentation or examples.

Thanks,
Maksim

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,797 questions
{count} votes

Accepted answer
  1. Roy Li - MSFT 33,001 Reputation points Microsoft Vendor
    2020-06-29T03:21:34.15+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

    Your question about One drive is not supported yet now. The One drive team is answering questions on StackOverflow with the onedrive tag. Or you could ask in the Github issues of OneDrive SDK.

    Thank you.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.