Permission needed for Rest API MoveTo() function

%3CLINGO-SUB%20id%3D%22lingo-sub-1932993%22%20slang%3D%22en-US%22%3EPermission%20needed%20for%20Rest%20API%20MoveTo()%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1932993%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20community%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20REST%20API%20in%20SharePoint%202013%20to%20create%20list%20items%20in%20custom%20list.%20In%20order%20to%20avoid%20the%205000%20list%20view%20threshold%20limit%2C%20I%20am%20creating%20folder%20by%20month-year%20combination%20to%20save%20the%20list%20items.%20Currently%20we%20are%20creating%20the%20item%20in%20the%20list%20root%20and%20then%20using%20the%20REST%20MoveTo()%20function%20to%20push%20the%20list%20item%20in%20month-year%20folder.%20Since%20we%20do%20not%20want%20user%20to%20delete%20the%20records%2C%20we%20have%20created%20custom%20permission%20(copy%20of%20contribute%20permission)%20and%20removed%20the%20Delete%20item%2C%20Delete%20Version%20and%20Personal%20View%20checkbox%20from%20the%20permission.%20When%20I%20run%20the%20API%20using%20contribute%20permission%2C%20it%20works%20and%20pushes%20the%20list%20item%20in%20the%20folder.%20But%20when%20I%20use%20custom%20permission%20then%20it%20does%20not%20move%20the%20item%20to%20the%20folder%20and%20instead%20it%20show%20me%20403%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Does%20MoveTo()%20internally%20deletes%20the%20item%20and%20creates%20new%20item%20in%20the%20target%20folder%20%3F%3C%2FP%3E%3CP%3ENote%3A%20We%20do%20not%20want%20to%20provide%20users%20with%20Delete%20item%20permission.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2)%20Is%20the%20any%20other%20Rest%20API%20where%20I%20can%20directly%20create%20list%20item%20inside%20a%20folder%20to%20avoid%20the%20use%20of%20MoveTo()%20function%20at%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20advise.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHelp%20needed!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1932993%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1933011%22%20slang%3D%22en-US%22%3ERe%3A%20Permission%20needed%20for%20Rest%20API%20MoveTo()%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1933011%22%20slang%3D%22en-US%22%3ERun%20it%3CBR%20%2F%3EOk%3C%2FLINGO-BODY%3E
New Contributor

Hello community,

 

I am using REST API in SharePoint 2013 to create list items in custom list. In order to avoid the 5000 list view threshold limit, I am creating folder by month-year combination to save the list items. Currently we are creating the item in the list root and then using the REST MoveTo() function to push the list item in month-year folder. Since we do not want user to delete the records, we have created custom permission (copy of contribute permission) and removed the Delete item, Delete Version and Personal View checkbox from the permission. When I run the API using contribute permission, it works and pushes the list item in the folder. But when I use custom permission then it does not move the item to the folder and instead it show me 403 error. 

 

1) Does MoveTo() internally deletes the item and creates new item in the target folder ?

Note: We do not want to provide users with Delete item permission. 

 

2) Is the any other Rest API where I can directly create list item inside a folder to avoid the use of MoveTo() function at all.

 

Please advise.

 

Help needed!!!

2 Replies

@SolutionsManIsMe : Did not understand your reply. Please explain.