如何从 OneDrive SDK 升级到 Microsoft Graph SDK 并保留旧的 AppFolder

编程入门 行业动态 更新时间:2024-10-11 03:17:08
本文介绍了如何从 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).

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

I didn't get the authentication to work using the old client id registered in apps.dev.microsoft, so I registered my app in aad.portal.azure/ 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

本文发布于:2023-11-28 14:23:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642774.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   SDK   OneDrive   AppFolder   Graph

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!