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:
- To send data to a document library that is directly off the root, enter /:/docLibraryName, where the document library is docLibraryName.
- 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.
- To redirect to a different OneDrive account, simply enter the account to which you want to redirect. Do not use path redirects.
- The formatting rules for redirect paths in SharePoint jobs are different from OneDrive. Use the correct path conventions for your job’s target.
- 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..”
- “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:
- 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.
- You do not need to make any URL encoding conversions, such as entering <span=class=”helpCode”>%20 for spaces.
- 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 firstname.lastname@example.org, enter /email@example.com/documents. Also enter the same email (e.g., firstname.lastname@example.org) as the Target Owner.
- Run a simulation to ensure that you will get the expected results from your redirects in the spreadsheet.