You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询:能否通过Microsoft Graph API创建OneDrive文件夹密码保护链接

Hey Rhyd,

Unfortunately, the Microsoft Graph API's DriveItem CreateLink operation doesn't support directly setting a password for shared links right now.

Even though you can create password-protected links through the OneDrive web interface or desktop client, this specific security control hasn't been exposed via the Graph API endpoints yet. As you noticed, the official documentation for CreateLink doesn't include any parameters related to password settings—this is a deliberate limitation at the moment.

Workarounds to Consider:

  • Use the OneDrive PowerShell Module: Tools like New-PnPOneDriveSecureLink let you create password-protected shared links programmatically. This requires setting up the PowerShell environment and having appropriate permissions (like Site Collection Administrator or equivalent).
  • Check the Beta Graph API (Use with Caution): Occasionally, beta endpoints may preview upcoming features, but they're not intended for production use. As of now, even the beta version of CreateLink doesn't offer a documented way to set a password for links.

If this functionality is critical for your use case, I'd recommend submitting a feature request through Microsoft's feedback portal—user input helps prioritize which API capabilities get added next.

内容的提问来源于stack exchange,提问作者Rhydian Coombs

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 08:57:15