Bypassing the Content Organiser in SPO

I haven’t had to work with the content organiser since SP2010, but just recently I was working with a client that wanted to re-create some of their on-prem 2010 configuration in SharePoint Online. One of these items was the use of the Drop-Off library to allow third parties to add documents into their libraries, whilst restricting access to other third parties documents.

This was originally built in SP2010 and has been working away there without any issues for several years so moving it into Office 365 was a fairly simple process of activating the Document Routing feature in the new site and setting up the content types for routing. (If you’re not familiar with document routing, then the Office Support site has some great info which you can find here..)

I’ve activated the Content Organiser site feature, and created a new document library called “Target Library” and configured it to have the sample routing content type applied.

SNAGHTML4b13fa6

With the library and content types in place, we can configure the Content Organiser by going to Site Settings and looking under Site Administration.

SNAGHTML4b2d81e

It’s the very first setting that I want to highlight an issue with in SharePoint Online (And I would imagine SP2013 too as it has the same functionality available)

SNAGHTML4b48f0d

The setting is titled “Redirect users to the Drop Off Library” and basically states very clearly that if a library is the target of a content organiser rule, then users attempting to upload files into that library will be redirected to the drop-off library. This absolutely makes sense because we may want to ensure that certain fields are applied or that the content is placed into particular folders based on business rules that the average end-user may not be aware of.

So that we can see this in action, we’ll configure a simple rule that requests a field to be set by a user, and then places the uploaded document into a folder relating to the chosen partner.

SNAGHTML4b9e4ac

With our content type selected (I’m not routing in from other site collections with potentially different names for the content type, so I can ignore that setting, but it’s useful to know about!), I’ve then removed the property condition as I want this rule to trigger on every instance of this content type, and then configured the target library:-

SNAGHTML4bee1ee

Once done, click OK and the rule will be displayed in the rule list view. With that configured, we can go to our Target Library and try and upload a file. You can see in the image below that clicking on the Upload File link in the menu bar, we get a standard modal dialog pop-up, but the clue is in the text displayed at the top. This is the dialog from the Drop Off library!

SNAGHTML4c0a72f

Excellent, if we upload a document the properties window will open to gather properties, the rule will apply and our document will get routed properly into the Target Library. If I cancel the window at this point, the file will exist in the drop-off library awaiting properties to be set, proving that the setting we configured earlier is doing exactly what it should.

SNAGHTML4c2da02

Now all I need to do is go into the drop-off library, configure the properties that I ignored and it would route correctly.. (And if you’re wondering what happens if I forgot to do that? Well the Content Organiser will notify the site owner that there are documents awaiting routing after a set amount of time, configurable in the settings page.).

So this is all well and good, everything is working as it did in SharePoint 2010, but the problem comes with the addition of Drag/Drop functionality in SP2013/SPO:-

SNAGHTML4c67f36SNAGHTML4c6e3f1

You’ll see that any user can just drop a file into the Target Library, completely ignoring the rules configured in the content organiser. Unfortunately if you have external users, there’s no easy fix for this other than some obfuscation. Simply put, hiding the target library from the users and making it plainly obvious that they should be placing documents in the drop-off library. For my recent client, we achieved this by putting a very clear link on the landing page for the users to click on to upload a file. This caused the standard File Upload dialog to open against the drop-off library. All mention of the target library was removed from the navigation, except for an audience based link for the Admins.

If all of your users are internal users and you’re not sharing with External users, then you do have a simple fix and that is to change the permissions on the target library so that only the admins have contribute access and all others have read or no access. As the Content Organiser runs as the timer account, it has full access and documents get routed as expected. This configuration does cause a problem with external users, which I’ll cover in another post in the next few days.

I hope this is of some use.

Paul.

6 comments

Skip to comment form

  1. Paul – thanks for sharing this post – I hit the same “undocumented feature” today and was baffled why some documents seemed to route and others didn’t, took me a while to figure out the drag’n’drop was the problem.
    I agree with your workaround… permissions and UI will do nicely.

    • Mark Wilson on Thu 2 Mar 17 at 4:30 pm
    • Reply

    So this seems to talk about drag drop on the target library not the drop off one. I am seeing an issue with documents added to the dropoff library with drag drop not being routed either. Did you see that as well?

    1. Hi Mark,

      Yes, this specific issue was the ability to basically bypass the content organiser rule by dropping files straight into the target library.

      I’m guessing your issue is because drag/drop doesn’t give the users the ability to set any required properties for routing? E.g. If you’re routing rule is based on the value of a Choice metadata field, when you drag/drop a file into the library this field doesn’t get set.

      if that’s not the case and your documents have all the relevant metadata fields set, then I would raise a case with MS support through your O365 portal. I found them to be really helpful recently with a site collection issue I had at a client.

      Paul.

        • Mark Wilson on Fri 3 Mar 17 at 8:19 am
        • Reply

        I thought it was custom metadata at first but then just set it to be using the standard OOTB Document content type. Same thing. Documents added by drag drop don’t get routed. You have to check out/in for it to happen. Uploading through the standard upload works fine.

        1. Hmm, I’ll take a look at this after SPS Munich this weekend. If it’s easily re-creatable which I suspect it may well be, then I’ll raise it through the MVP channels as a bug.

          • Luke GReening on Fri 9 Jun 17 at 3:52 pm
          • Reply

          Yeah that won’t work unless you have default value columns set when a document is uploaded based on its content type. Otherwise the system will just set to checked out and expect the required fields to be entered before the rule can fire.

          I am looking at this for over 1200 rules so looking for a decent way to copy rules so all that is required is little tweaks. I have found a way through SP Designer, then allowing this Workflow to be ran manually to copy the items, setting creating auto on creation will not work as there is already the Content organiser rule so you need to do it manually.

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.