none
Moving document through REST give Unauthorised in Response Code due to long URL

    Question

  • Hello,

    We are trying to build a document approval workflow where the documents should move from one folder to another.

    Our library structure is deep and the folder names are some what long.

    We are using REST to move the document between folders in order to preserve the history and versioning.

    However we get an error in responseCode variable "Unauthorised" when the URL for the CALL HTTP Web Service is used.

    We have tried with short file names and short folder path to see if error persist but there wasn't any error and the files moved with all the metadata. Since we are on SharePoint Online we cannot configure Web.Config URL length.

    Is there a solution to come over this limitation?

    Thank you

    Tanzim


    Tanzim Akhtar

    Monday, August 25, 2014 3:19 PM

Answers

All replies

  • Hi,

    According to your post, my understanding is that Moving document through REST give Unauthorised in Response Code due to long URL.

    It seems that you have long folder name in document library which exceeds the max URL length limitation.

    I would recommend you to find a way to shorten the folder name.

    You can remove the RootFolder parameter and use the hierarchical URL like this:

    http:///sites/Documents Library/Folder1/Folder2/Folder3

    More information:

    URL path length restrictions (also apply to SharePoint 2013)

    http://technet.microsoft.com/en-us/library/ff919564.aspx

    Regarding SharePoint Online, for quick and accurate answers to your questions, it is recommended that you initial a new thread in Office 365 forum.

    Office 365 forum http://community.office365.com/en-us/forums/default.aspx

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support

    Wednesday, August 27, 2014 8:50 AM
    Moderator
  • Hello,

    Thank you for the reply.

    We have already implemented this workaround by shortening the folder names as I mentioned in my post.

    Moreover I have no issues while browsing the files/folder on SharePoint Online but in SharePoint Designer while calling the Call HTTP step, still do I have to post in SharePoint Online forum?

    Best Regards

    Tanzim


    Tanzim Akhtar

    Wednesday, August 27, 2014 12:33 PM
  • Hi,

    This is a forum which is supported for SharePoint On-Premise.

    You'd better to post the question in Office 365 forum and more experts will assist you.

    Office 365 forums :http://community.office365.com/en-us/forums/default.aspx

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support

    Thursday, August 28, 2014 2:48 AM
    Moderator
  • Thank you very much for the clarification. I will post it on SharePoint Online forum or try to change this one in sha' Allaah.

    Best regards

    Tanzim


    Tanzim Akhtar

    Thursday, August 28, 2014 8:06 AM