简体   繁体   English

如何在OneDrive中设置公用文件夹权限?

[英]How can I set public folder permissions in OneDrive?

I have been using this API to list and read files from my Public folder in OneDrive personal cloud service: 我一直在使用此API从OneDrive个人云服务中的“ 公用”文件夹中列出和读取文件:

https://api.onedrive.com/v1.0/drive/items/{item-id}/children

I could simply access folder's content in C# without authentication: 我可以简单地在C#中访问文件夹的内容而无需身份验证:

using (var http = new HttpClient()) {
    var json = http.GetStringAsync($"https://api.onedrive.com/v1.0/drive/items/{itemId}/children").Result;
    var data = JObject.Parse(json);
    ...
}

This API suddenly stopped working. 该API突然停止工作。 It returns 404 status code with this content: 它返回404状态代码,其中包含以下内容:

{"error":{"code":"itemNotFound","message":"Item does not exist"}}

But the API is still working for other public folders owned by other accounts. 但是,该API仍适用于其他帐户拥有的其他公用文件夹。 For example this URL still works: 例如,此URL仍然有效:

https://api.onedrive.com/v1.0/drive/items/AB8DAAB49807BE4%21140/children

How can I set folder's permission to public ? 如何设置文件夹的公开权限? Why the API stopped working? 为什么API停止工作?

Microsoft is in a process of removing the public sharing feature. Microsoft正在删除公共共享功能。 It's been a source of confusing for end users who don't understand the difference between sharing something as public and sharing a view or edit link to a file. 对于不了解以公共方式共享内容和共享视图或编辑文件链接之间的区别的最终用户而言,这是一个令人困惑的来源。

source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查本地OneDrive文件夹是否同步? - How can I check local OneDrive folder is in sync? 如何使用OneDrive API将文件上传到OneDrive上的共享文件夹中? - How can I upload files into a shared folder on OneDrive using OneDrive API? 如何确定Outlook文件夹是否公开? - How can I determine if an Outlook folder is public? 如何使用 c# 或 PowerShell 检查 OneDrive 文件夹中文件/文件夹的状态是否已同步? - How can I check status of files/folders in OneDrive folder whether it is synced or not using c# or PowerShell? 如何获得OneDrive中另一个文件夹内的文件夹的文件夹ID? - How can i get folder id of folders inside another folders in onedrive? CSOM在OneDrive文件夹上设置共享 - CSOM Set Sharing on OneDrive Folder 我如何知道我在caspol的特定文件夹中拥有的权限? - How can i know the permissions that i have in a specific folder with caspol? 如何获得管理员权限以删除文件/文件夹? - How can I get admin permissions to delete a file/folder? 如何使用 C# ASP.NET Core 应用程序通过 Elastic Beanstalk 设置对特定文件夹的权限? - How can I set permissions to a specific folder with Elastic Beanstalk using a C# ASP.NET Core app? 如何为活动目录的用户授予FTP文件夹权限 - How can I grant permissions for a FTP Folder for users of the active directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM