如何从 OneDrive SDK 升级到 Microsoft Graph SDK 并保留旧的 AppFolder [英] How to upgrade from OneDrive SDK to Microsoft Graph SDK and keep the old AppFolder

查看:106
本文介绍了如何从 OneDrive SDK 升级到 Microsoft Graph SDK 并保留旧的 AppFolder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 UWP 应用使用应用文件夹 (Files.ReadWrite.AppFolder) 在 OneDrive 上存储应用数据.我升级了应用程序以使用 Microsoft Graph SDK 而不是旧的 OneDrive SDK(版本 1.x).

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).

我没有使用在 https://apps.dev 中注册的旧客户端 ID 进行身份验证.microsoft.com,所以我在 https://aad.portal.azure 中注册了我的应用.com/,我使用 MSAL.NET 进行身份验证.

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.

问题是升级后的应用在 OneDrive(我的应用 1)上创建了一个新的应用文件夹,而不是使用旧的和现有的应用文件夹(我的应用).这会导致用户在升级到此新版本时丢失数据.

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?

推荐答案

不可能,app 文件夹链接到应用程序的 id.如果您切换应用 ID,您将无法访问之前的文件夹.

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.

您真正需要做的是更新您之前的应用注册,并使用它来对 Graph 进行身份验证.

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

这篇关于如何从 OneDrive SDK 升级到 Microsoft Graph SDK 并保留旧的 AppFolder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆