2016-04-03 342 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