1. Home
  2. Adapters
  3. Microsoft
  4. Microsoft Adapters: Adding Redirects To OneDrive and Sharepoint DocLibs

Microsoft Adapters: Adding Redirects To OneDrive and Sharepoint DocLibs

Adding a Redirect to SPO From a OneDrive Job

The following instructions will redirect data to a Sharepoint Online Document Library from an account mapping job that has OneDrive for Business (Admin) as the target node.

An account mapping job that has a OneDrive target can have redirects that send data to SharePoint sites/doc libraries. The formats are as follows:

  1. To send data to a document library that is directly off the root, enter /:/docLibraryName, where the document library is docLibraryName.
  2. To send data to a subsite/doc library, enter the /subsite path:/document library path. Example: /:sites/engineering/Documents goes to the doc library Documents in the /sites/engineering subsite. /:marketing/DocLib/Folder1 goes to the folder Folder1 in the /marketing/DocLib subsite/document library.
  3. To redirect to a different OneDrive account, simply enter the account to which you want to redirect. Do not use path redirects.
  4. The formatting rules for redirect paths in SharePoint jobs are different from OneDrive. Use the correct path conventions for your job’s target.


  1. Always use the Document Library names specified in the left-hand sidebar of the site, and not what displays in the browser’s URL window.
    Microsoft conventionally changes the default document library name, “Documents,” to “Shared%20Documents” in the URL. Use “Documents” when constructing paths. Likewise, if you have a root document library “/doc lib with spaces,” enter “/:/doc lib with spaces,” not “/:/doc%20lib%20with%20spaces..”
  2. “Forms” is a reserved word in SPO. You cannot write to /Forms subsites. You can create – and transfer – folders called “Forms,” but CFP will convert them to the UTF equivalent name (_u0066__u006f__u0072__u006d__u0073_) on the SPO target if they are the top folder in the subsite. Folders further down – e.g., /sites/subsite/docLib/FolderA/Forms – will transfer as is.

Adding a Redirect to OneDrive From an SPO Job

You can add redirects in your spreadsheet to multiple Sharepoint subsites in a single mapping spreadsheet, thereby filling several subsites from a single job.  You can also send data to OneDrive personal sites.  Be aware of the following:

  1. To send data to a Sharepoint subsite, enter the full path to a document library in the subsite.  The Target Path in the paths tab of your mapping spreadsheet should look like /sites/subsite/doc library or /subsite/doc library.  You cannot write directly to a Microsoft subsite, so if you don’t include a doc library in the path, that portion of the job will result in a write error. Enter the global admin email in the Target Owner field.
  2. You do not need to make any URL encoding conversions, such as entering <span=class=”helpCode”>%20 for spaces.
  3. To send data to a OneDrive account, enter a Target Path in the format /personal/account_email/documents.  For example, to send data to a OneDrive account joe@company.onmicrosoft.com, enter /personal/joe@company.onmicrosoft.com/documents. Also enter the same email (e.g., joe@company.onmicrosoft.com) as the Target Owner.
  4. Run a simulation to ensure that you will get the expected results from your redirects in the spreadsheet.
Updated on November 11, 2020

Related Articles