Creating a folder in "OneDrive for Business" using the SharePoint REST API fails with "System.UnauthorizedAccessException" -



Creating a folder in "OneDrive for Business" using the SharePoint REST API fails with "System.UnauthorizedAccessException" -

i writing "sharepoint app", i.e. web application connects "onedrive business" on behalf of user. thought publish info construction web application in "onedrive busiess".

i have succeeded @ next tasks:

creating app in microsoft azure advertisement of organization authenticating user vs. office 365 , getting access "onedrive business" content, thereby getting oauth2 access token using token access "onedrive business" filesystem construction using sharepoint 2013 rest api described @ http://blogs.msdn.com/b/sharepointdev/archive/2013/08/13/access-skydrive-pro-using-the-sharepoint-2013-apis.aspx

actions work (i.e. utilize api perform actions successfully)

retrieving folders' contents (files , subfolders) creating files reading files deleting files deleting folders

however, can't create folder, no matter how hard try. next error:

{"error":{"code":"-2147024891, system.unauthorizedaccessexception","message":{"lang":"en-us","value":"access denied. not have permission perform action or access resource."}}}

i've tried next approaches:

post _api/web/folders json post body of { __metadata: { type: 'sp.folder' }, serverrelativeurl: '/entire/path/to/new/folder' }

post _api/web/getfolderbyserverrelativeurl('/path/to/existing/folder')/folders json post body of { __metadata: { type: 'sp.folder' }, serverrelativeurl: 'newfoldername' }

post _api/web/folders/add('/entire/path/to/new/folder') empty post body

the result same.

sharepoint 2013 - system.unauthorizedaccessexception: access denied appears have similar question, far understand proposed answer, not applicable api phone call performed web application using oauth2 credentials.

rest sharepoint office365

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -