问题
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