【发布时间】:2018-08-20 20:18:52
【问题描述】:
我注意到一个非常奇怪的问题。如果用户拥有 Microsoft 帐户并接受邀请,系统将删除所有共享文档的权限。
- 上传文件:
await _graphClient.Drives[_driveId].Root.ItemWithPath(itemWithPath) .Content.Request() .PutAsync<DriveItem>(fileStream)
- 创建客人:
await _graphClient.Invitations.Request().AddAsync(new Invitation() { InvitedUserEmailAddress = email, InvitedUserDisplayName = displayName, SendInvitationMessage = false, InviteRedirectUrl = NullableString.Parse(ConfigurationManager.AppSettings["AppAddress"]) });
- 添加权限:
await _graphClient.Drives[_driveId].Items[driveItemId].Invite( recipients, requireSignIn: true, roles: new[] { "write" }, sendInvitation: false ).Request().PostAsync();
在文档的 onedrive 中,我看到用户被授予,但是一旦用户打开文档的 URL 并接受兑换到 azure Active Directory 的邀请,就会看到错误,无法访问文档。在 azure 目录中,如果接受条款,则首先将用户标记(源)为受邀用户,而不是 Microsoft 用户。
如果我在用户接受邀请兑换后重复相同的场景,则访问会按预期保持。那么有什么问题呢?为什么系统要删除访问权限?
【问题讨论】: