2016-04-03 331 views
1

我在Azure Portal中設置了一個iOS應用程序,以便與OneDrive進行業務集成。Onedrive for Business - 無法共享文件/文件夾:403「禁止」

在「權限到其他應用程序,」我們選擇了所有許可 - 微軟圖形 - Office 365中的SharePoint Online - 窗口Azure中的Active Directory

我在SDK運行iOS的示例代碼和它的作品幾乎函數接受爲「共享文件」。錯誤:403「禁止」UserInfo = {error = notAllowed:該功能已被禁用。請與您的管理員聯繫,以使其能,NSLocalizedDescription =禁止}

screenshot

也許我錯過了任何配置的地方?能否請您指點

感謝問候,

回答

0

你是如何共享的文件,創建一個共享鏈接或邀請的人?基於測試,OneDrive REST API適用於創建共享鏈接和邀請人員。您是否可以使用OneDrive REST API重現此問題?

這裏是OneDrive REST API供您參考。

分享鏈接:

POST https://msdnofficedev-my.sharepoint.com/_api/v2.0/drive/items/01EOIEB3KQBZ74CI7DYBELCRPNZVJKSOUC/action.createLink

頁眉:

authorization: bearer {token} 

Content-Type: application/json 

身體:

{ 
    "type": "view" 
} 

邀請人:

POST https://msdnofficedev-my.sharepoint.com/_api/v2.0/drive/items/01EOIEB3KQBZ74CI7DYBELCRPNZVJKSOUC/action.invite

頁眉:

authorization: bearer {token} 

Content-Type: application/json 

身體:

{ 
    "requireSignIn": false, 
    "sendInvitation": true, 
    "roles": ["write"], 
    "recipients": [ 
    { "email": "[email protected]" } 
    ], 
    "message": "Here's the document I was talking about yesterday." 
} 

而且你可以參考下面的鏈接來獲得訪問令牌: https://dev.onedrive.com/auth/aad_oauth.htm