0

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?

kine
  • 1,352
  • 2
  • 12
  • 24

1 Answers1

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.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • Thanks for your comment. I didn't want to switch App Id and I don't know why it has changed. Do you mean it is not possible to keep the old App Id? It is still the same app, published in the Microsoft Store. – kine Sep 20 '20 at 08:57
  • I already tried to use the previous app registration to authenticate against Graph, but I didn't get it working. Based on information found from various places (MS documentation, StackOverflow) my conclusion was that it is not possible to authenticate against Graph using the old app registration from https://apps.dev.microsoft.com. – kine Sep 20 '20 at 09:11
  • Not only can those app registrations be used for Graph, but it was also the recommended system for registration for several years. If you are having issues then I recommend opening a separate question for those issues. It should work. – Marc LaFleur Sep 21 '20 at 20:38
  • I guess registering an app creates always a new App Id and there is no way to link it to the old App Id. So I accept this answer although it doesn't solve the issue. I added a new [related question](https://stackoverflow.com/questions/64121279/how-to-authenticate-live-sdk-uwp-application-against-microsoft-graph). – kine Sep 30 '20 at 14:03