2016-04-26 58 views
0

我试图找出如何使用MicrosoftGraph执行两种类型的共享操作的:如何共享文件进行编辑的组织之外#MicrosoftGraph

(1)是否有可能使用#MicrosoftGraph共享一个我的组织以外的Office365文档?在谷歌短语中,我已经在自定义应用程序域ACME.COM下创建了一个文档,并且我想允许一些任意[email protected]写入文档的权限。 (2)是否有可能使用#MicrosoftGraph将Office365文档共享给任何有文档链接的人?

谢谢!

回答

0

(2)是否有可能使用#MicrosoftGraph共享的Office365文件给任何人链接到文件?

是的,我们可以使用Microsoft Graph共享文档链接为匿名。但是,匿名链接可能会被租户管理员禁用,请确保在将文档分享给匿名人员之前启用它。

这是给你参考的例子:

POST:https://graph.microsoft.com/v1.0/me/drive/items/ {}的itemId /microsoft.graph.createLink

authorization: bearer {token} 
Content-type: application/json 

{ 
    "type": "view", 
    "scope": "anonymous" 
} 

更新:

现在我们能够发送共享邀请到现有项目。共享邀请会创建唯一的共享链接,并向包含共享链接的邀请收件人发送电子邮件。

样品:

POST:https://graph.microsoft.com/beta/me/drive/items/itemId/invite 

authorization: bearer {token} 

Content-type: application/json 

{ 
"recipients": [ { "email": "mailAdress" } ], 
"message": "Here's the file I mentioned during our meeting.", 
"requireSignIn": true, 
"sendInvitation": true, 
"roles": [ "write" ] 
} 

参考here这个API。