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