How to upgrade from OneDrive SDK to Microsoft Graph SDK and keep the old AppFolder

倾然丶 夕夏残阳落幕 提交于 2021-02-11 14:59:27

问题


My UWP app uses app folder (Files.ReadWrite.AppFolder) for storing app data on OneDrive. I upgraded the app to use Microsoft Graph SDK instead of the old OneDrive SDK (version 1.x).

I didn't get the authentication to work using the old client id registered in https://apps.dev.microsoft.com, so I registered my app in https://aad.portal.azure.com/ and I use MSAL.NET for authentication.

The problem is that the upgraded app creates a new app folder on OneDrive (My App 1) instead of using the old and existing app folder (My App). This would result users loosing their data when they upgrade to this new version.

What should I do to make the upgraded app access the existing app folder and not to create a new one?


回答1:


It isn't possible, the app folder is linked to the application's id. If you switch your App Id, you will lose access to the previous folder.

What you really need to do is update your previous app registration and use that to authenticate against Graph.



来源:https://stackoverflow.com/questions/63953408/how-to-upgrade-from-onedrive-sdk-to-microsoft-graph-sdk-and-keep-the-old-appfold

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!