2016-04-26 33 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。