# SharePoint Online Importer

## Introduction

The Microsoft SharePoint Online Importer allows migrating documents, folders, list items and lists/libraries to SharePoint Online offering following features:

* Import documents to Microsoft SharePoint Online Document Library items
* Import URL / Link documents
* Import folders to Microsoft SharePoint Online Document Library items
* Import list items to Microsoft SharePoint Online Document Library items
* Import lists/libraries to Microsoft SharePoint Online Sites
* Set values for any columns in SharePoint Online, including user defined columns
* Set values for SharePoint Online specific internal field values
* Create documents, folders and list items using standard SharePoint Online content types or custom content types
* Set permissions for individual documents, folders, list items and lists/libraries
* Set the folder path and create folders if they don’t exist
* Apply Content Types automatically to lists/libraries if they are not applied yet
* Delta migration
* Import versions (minor or major, automatic enabling of versioning in the targeted document library)
* Import files with a size up to 250 GB
* Set Microsoft Information Protection (MIP) Sensitivity Labels on content files prior to uploading them to SPO

The SharePoint Importer is implemented mainly as a Job Server component but comes with a separate component for setting SharePoint Online specific internal field values, which can be installed optionally and if necessary.

The SharePoint Importer is implemented mainly as a Job Server component but comes with a separate component for setting SharePoint Online specific internal field values, which can be installed optionally and if necessary.

## Known issues and limitations

Due to restrictions in SharePoint, documents cannot be moved from one Library to another using migration-center once they have been imported. This applies to Version and Update objects.

Moving folders is only supported within the same site, i.e. the importer parameter "siteName" and the system attribute "site" must have the same values for the initial and any update import runs.

Even though some other systems such as Documentum allow editing of older versions, either by replacing metadata, or creating branches, this is not supported by SharePoint. If you have updates to intermediate versions to a version tree that is already imported, the importer will return an error upon trying to import them. The only way to import them is to reset the original version tree and re-import it in the same run with the updates.

{% hint style="danger" %}
Running multiple Job Servers for importing into SharePoint must be done with great care, and each of the Job Servers must **NOT** import in the same library at the same time. If this occurs, because the job will change library settings concurrently, the versioning of the objects being imported in that library will not be correct.
{% endhint %}

The SharePoint Online system has some limitations regarding file names, folder names, and file size. Our SharePoint Online importer will perform the following validations before a file gets imported to SharePoint Online (in order to fail fast and avoid unnecessary uploads):

* Max. length of a file name: 400 characters
* Max. length of a folder name: 400 characters
* Invalid leading chars for file or folder name: *SPACE*
* Invalid trailing chars for file or folder name: *SPACE*, *PERIOD*
* Invalid file or folder names: "AUX", "PRN", "NUL", "CON", "COM0", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT0", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"
* The following characters are not allowed in file or folder names: " \* : < > ? / \ |
* Max. length of a file path: 400 characters
* Max. size of a file: 250 GB
* Max. size of an attachment: 250 MB

Some fields in the list item associated with a document might be overwritten by the SharePoint document property promotion. To avoid that, it is recommended to disable document property promotion for the website during the migration as described here: <https://support.migration-center.com/hc/en-us/articles/360013425100-How-to-disable-automatic-document-property-promotion-in-SharePoint-on-premise>

## Prerequisites

### CSOM service

The migration-center SharePoint Online Importer requires installing an additional component.

This additional component needs the **.NET Framework 4.7.2** installed and it’s designed to run as a Windows service and must be installed on all machines where the a Job Server is installed.

To install this additional component, it is necessary to run an installation file, which is located within the SharePoint folder in the Jobserver instal: \
\&#xNAN;**...\lib\mc-sharepointonline-importer\CSOM\_Service\install**

To install the service run the **install.bat** file using administrative privileges. \
You need to start it manually after the install. Afterwards the service is configured to start automatically at system startup.

{% hint style="info" %}
The CSOM service must be run with the same user as the Job Server service so that it has the same access to the export location.
{% endhint %}

{% hint style="warning" %}
When running the CSOM service with a domain account you might need to grant access to the account by running the following command:\
`netsh http add urlacl url=http://+:57096/ user=<your user>`

\<your user> might be in the format domain\username or <username@domain.com>
{% endhint %}

To uninstall the service run the **uninstall.bat** file using administrative privileges.

{% hint style="danger" %}
Before uninstalling the Jobserver component, the CSOM service must be uninstalled as described here.
{% endhint %}

### Port access

The app-only principal authentication used by the importer calls the following HTTPS endpoints. Please ensure that the job server machine has access to those endpoints:

* ***\<tenant name>*****.sharepoint.com:443**
* **accounts.accesscontrol.windows.net:443**

## Authentication

The migration-center SharePoint Online Importer supports **Azure AD app-only** authentication. This is the authentication method recommended by Microsoft.&#x20;

### Generate Azure AD App-Only

Please follow the official Microsoft documentation for configuring the Azure AD authentication:

{% embed url="<https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread#setting-up-an-azure-ad-app-for-app-only-access>" %}

When selecting which API permissions to include, you need to select:\
&#x20;\- **SharePoint** then **Application Permissions** then check **Sites.FullControl.All**\
&#x20;\- **Graph** then **Application Permissions** then check **Sites.FullControl.All**

{% hint style="danger" %}
Note that **Delegated permissions** are not intended for application use and are not supported by migration center since each run would require entering generated code.&#x20;
{% endhint %}

### Using Sites.Selected permissions

In case your organization does not allow giving **Sites.FullControl.All** to the AppClient ID as the Microsoft documentation instructs, you also have the option of using the **Sites.Selected** permission instead.

However this requires additional work of specifying which sites are selected. The official Microsoft method involves using Microsoft Graph: \
<https://learn.microsoft.com/en-us/graph/permissions-selected-overview>

Alternatively you can use the Powershell library Connect-PnPOnline:&#x20;

```powershell
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/YourSite" -Interactive
Grant-PnPAzureADAppSitePermission -AppId 'YOUR_APP_ID' -DisplayName 'Your App Name' -Site 'https://.../YourSite' -Permissions FullControl
```

### Use it in migration-center

In order to use Azure AD app-only principal authentication with the SharePoint Online importer you need to fill in the following importer parameters with the information:

<table data-header-hidden><thead><tr><th width="246">Configuration parameters</th><th>Values</th></tr></thead><tbody><tr><td><strong>Configuration parameters</strong></td><td><strong>Values</strong></td></tr><tr><td>appClientId</td><td>The ID of the migration-center Azure AD application.</td></tr><tr><td>appCertificatePath</td><td>The full path to the certificate .PFX file, which you have generated when setting up the Azure AD application.</td></tr><tr><td>appCertificatePassword</td><td>The password to read the certificate specified in appCertificateNEW TESPath.</td></tr></tbody></table>

## Importer Configuration

To create a new SharePoint Online Importer, create a new importer and select *SharePoint Online* from the *Adapter Type* drop-down. Once the adapter type has been selected, the Parameters list will be populated with the parameters specific to the selected adapter type. Mandatory parameters are marked with an \*.

The Properties of an existing importer can be accessed after creating the importer by double-clicking the importer in the list or selecting the Properties button/menu item from the toolbar/context menu. A description is always displayed at the bottom of the window for the selected parameter.

Multiple importers can be created for importing to different target locations, provided each importer has a unique name.

### Importer parameters

The common adaptor parameters are described in [Common Parameters](https://docs.migration-center.com/common-parameters#common-adaptor-details).

The configuration parameters available for the SharePoint Online Importer are described below:

* **tenantName**\*\
  The name of your SharePoint Online Tenant\
  Example: Contoso
* **tenantUrl**\*\
  The URL of your SharePoint Online Tenant\
  Example: **<https://contoso.sharepoint.com>**
* **siteName**\*\
  The path to your target site collection for the import.\
  Example: **/sites/My Site**
* **appClientId**\*\
  The ID of either the migration-center Azure AD application or the SharePoint application.\
  Example: ab187da0-c04d-4f82-9f43-51f41c0a3bf0\
  See: [Authentication](#authentication).
* **appCertificatePath**\
  The full path to the certificate .PFX file, which you have generated when setting up the Azure AD application.\
  Example: D:\migration-center\config\azure-ad-app-cert.pfx\
  See: [Authentication](#authentication).
* **appCertificatePassword**\
  The password to read the certificate specified in appCertificatePath.\
  See: [Authentication](#authentication).
* **appClientSecret**\
  The client secret, which you have generated when setting up the SharePoint application.\
  See: [Authentication](#authentication).
* **autoAdjustVersioning**\
  If set the importer will update the library settings to allow versions imports.
* **autoAdjustAttachments**\
  If set the importer will update the library settings to allow attachments imports.
* **autoAddContentTypes**\
  If set the importer will update the library settings to allow items with custom content type imports.
* **autoCreateFolders**\
  If set the importer will automatically create the folder strcture needed for importing the object.
* **proxyURL**\
  This is the URL, which defines the location of your proxy to connect to the Internet. This parameter can be left blank if no proxy is used to connect to the internet.\
  Example: **<http://proxy.local:3128>**
* **proxyUsername**\
  The login of the user, who connects and authenticates on the proxy, which was specified in parameter proxyURL.\
  Example: **corporatedomain\username**
* **proxyPassword**\
  Password of the proxy user specified above
* **checkContentIntegrity**\
  If checked the importer will check the integrity of each document that has a checksum generated by the scanner, by downloading a copy of the content after the import and comparing the two checksums.\
  See: [Content Integrity Check](#content-integrity-check).
* **mipServiceConfigFile**\
  Full path to the MIP service configuration file. \
  See: [MIP sensitivity labels](#mip-sensitivity-labels).\
  Example: c:\migration-center\my-mipservice.config
* **loggingLevel**\*\
  See: [Common Parameters](https://docs.migration-center.com/common-parameters#logging-level).

{% hint style="warning" %}
Parameters marked with an asterisk **(\*)** are **mandatory**.
{% endhint %}

### Content Integrity Check

Starting from migration-center 3.5 the SharePoint Online importer has the option of checking the integrity of each document’s content after it has been imported. This will be done if the “checkContentIntegrity” parameter is checked and it will verify only documents that have a generated checksum in the Source Attributes.

Currently the only supported checksum algorithm is MD5 with HEX encoding.

{% hint style="info" %}
For certain types of documents such as Office documents and also .MSG documents, “Document Information Panel” is activated and SharePoint changes the content slightly upon upload. This will cause the integrity check to fail for those documents and there is no workaround so far, other than importing without the content integrity check or finding a way to disable this feature directly in SharePoint.
{% endhint %}

## Migset System Rules

### Documents

Documents targeted at a Microsoft SharePoint Online Document library will have to be added to a migration set. This migration set must be configured to accept objects of type *\<source object type>ToSPOnline(document).*

Create a new migration set and set the *\<source object type>ToSPOnline(document)* in the *Type* drop-down. This is set in the -Migration Set Properties- window which appears when creating a new migration set. The type of object can no longer be changed after a migration set has been created.

* **contentType**\*\
  Rule setting the content type.\
  Example: Task\
  This value must match existing migration-center object type definitions\
  See [Object Type definitions](#object-type-definitions).
* **copyRoleAssignments**\
  Specify if roles from the parent object are copied or not. This system rule is necessary only if the system rule roleAssignments is set, otherwise it is not used.\
  By default, this value is set to false.
* **fileExtension**\
  Specify the file extension of the file name that is used to upload the content file to SharePoint.\
  See also section [Object Values](#object-values)
* **isMajorVersion**\
  Specify, if the current object will be created as a major or minor version in the SharePoint target library.\
  Example:\
  TRUE or YES or 1 (check in as major version)\
  FALSE or NO or 0 (check in as minor version)
* **library**\*\
  Specify the name of the library, where to import the current object.
* **mc\_content\_location**\
  Specify the location of a document’s content file.\
  If not set, the default content location (i.e. where the document has been scanned from) will be used automatically.\
  Set a different path (including filename) if the content has moved since it was scanned, or if content should be substituted with another file.
* **parentFolder**\*\
  Rule which sets the path for the current object inside the targeted Document Library item\
  Example: /username/myfolder/folder\
  If the current object shall be imported on root level of the targeted library, specify a forward slash “/”.
* **roleAssignments**\
  Specify role assignments for the current object. If a role definition is assigned to the current object, the migration-center SharePoint Importer breaks the role inheritance.\
  It is possible to specify either a list of users and/or a list of SharePoint groups. If a group is specified, it is necessary, that the targeted SharePoint Group exists in your SharePoint Site.\
  Pattern for setting single users:\
  **username;#roledefinitionname**\
  Pattern for setting groups:\
  \&#xNAN;**@groupName;#roledefinitionname**\
  **Example:**\
  user;#Read\
  @Contributors;#Contribute
* **sensitivityLabel**\
  Name of the MIP sensitivity label to apply. \
  See: <https://docs.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels?view=o365-worldwide> for more details.
* **site\***\
  Specify the target (sub-) site relative to your site collection, which was specified in the SharePoint Importer connector parameters.\
  If the current object shall be imported on root level of the targeted site collection, specify a forward slash “/”

### Links

The same procedure as for documents also applies to links about to be imported to SharePoint Online. For links the object type to select for a migration set would be *\<source object type>ToSharePoint(link)*.

SharePoint Online supports documents with the file format ".url". We call these documents "link documents" since they do not have real content but just point to another document in SharePoint Online or to an external web site. The importer will create the necessary content of the link documents on the fly. Thus, the importer will ignore the content of any source object that is imported as a link document because it will import the generated link content instead.

Compared to the Documents migset, the **Link migset** is missing the **fileExtension** and **mc\_content\_location** system rules and has the following new rules:

* **url\***\
  The target URL of this link document. Can be a URL to another SharePoint document or a URL to an external web site.

  **Example**:

  *<https://contoso.sharepoint.com/sites/MySite/Documents/Test.docx>*

### Folders

The same procedure as for documents also applies to folders about to be imported to SharePoint. For folders the object type to select for a migration set would be *\<source object type>ToSharePoint (folder)*.

Compared to the Documents migset, the **Folder migset** is missing the **fileExtension**, **isMajorVersion** and **mc\_content\_location** system rules, and has no additional ones.

### Lists

The same procedure as for documents also applies to lists or libraries about to be imported to SharePoint. For lists or libraries the object type to select for a migration set would be *\<source object type>ToSharePoint (list)*.

Compared to the Documents migset, the **List migset** is missing the **contentType**, **fileExtension**, **isMajorVersion**, **library**, **mc\_content\_location** and **parentFolder** system rules, and has the following additional rules:

* **baseTemplate\***\
  Rule setting the base template for this list. \
  A list of valid values can be found in the [Appendix](#appendix).

  This value must match existing migration-center object type definitions; see paragraph [Object Type definitions](https://docs.migration-center.com/sharepoint-importer#object-type-definitions)
* **title**\
  Specify the title of the list or library, which will be created

### List Items

The same procedure as for documents also applies to list items about to be imported to SharePoint. For list items the object type to select for a migration set would be *\<source object type>ToSharePoint (listItem)*.

Compared to the Documents migset, the **ListItem migset** is missing the **fileExtension** and **mc\_content\_location** system rules, and has the following additional rule:

* **relationLinkField**\
  Rule which sets a list of column names, where to insert links to AttachmentRelation associated with the current object.

## Object Types

### Documents, Folders and List Items

In order to associate transformation rules with SharePoint Online columns, a migration-center object type definition for the respective content type needs to be created. Object type definitions are created in the migration-center client. To create an object type definition, go to Manage/Object Types and create or import a new object type definition. In case your content type contains two or more columns with the same display name, you need to specify the columns internal names as attribute names.

{% hint style="info" %}
Working with object type definitions and defining attributes is a core product functionality and is described in detail in the [Client User Guide](https://docs.migration-center.com/importers/broken-reference).
{% endhint %}

A Microsoft SharePoint Online content type corresponds to a migration-center object type definition. For the Microsoft SharePoint Online connector, an object type definition can be specified in four ways, depending on whether a particular SharePoint Online content type is to be used or not or multiple but different content types using the same name across site collections:

* *My Content Type* describes explicitly a SharePoint Online content Type named *My Content Type* defined either in the SharePoint document library or at Site Collection level
* *@My Document Library* describes the SharePoint Online document library named *My Document Library* using only columns, which are defined explicitly in the SharePoint Online document library *My Document Library*
* *My Content Type;#Any Custom Value* describes a SharePoint Online content type named *My Content Type.* Everything after the delimiter *;#* will be cut off on importing
* *@My Document Library;#Any Custom Value* describes the SharePoint Online document library named *My Document library* using only columns, which are defined explicitly in the SharePoint Online document library *My Document Library.* Everything after the delimiter *;#* will be cut off on importing.

### Lists

Importing lists or libraries into SharePoint Online is a little bit different than for documents, folders or list items, since the migration-center SharePoint Online Importer sets Microsoft defined attributes, which are not visible to the user. In order to set those attributes, it is necessary to create object type definitions for each type of list template (see [List of possible list templates](#list-of-possible-list-templates)). The SharePoint Online Connector is able to set any possible attribute of a list. See [List of possible list attributes](#list-of-possible-list-attributes) for more information about possible attributes.

## Object Values

### File Reader

The SharePoint Importer is able to read values from files. This might be necessary if the length of a string might exceed the maximum length of an Oracle database column, which is 4096 bytes.

To tell the SharePoint Importer reading strings from a text file, the *filepath* of the file containing the value must be placed within the markup *<@MCFILE>filepath\</@MCFILE>*.

The File Reader does not read values from files for the following attributes: Check-In Comment, Author, Editor, Creation Date, Modified Date.

**Example:**

Assuming you have a file at path **\\\scanlocation\temp\1\4a9daccf-5ace-4237-856c-76f3bd3e3165.txt** you must type the following string in a rule:

**<@MCFILE>\\\scanlocation\temp\1\4a9daccf-5ace-4237-856c-76f3bd3e3165.txt\</@MCFILE>**

On import the SharePoint importer extracts the contents of this file and adds them to the associated target attribute.

### Filename

The SharePoint Online Importer is able to modify the filename of a file, which is imported to SharePoint Online. To set the filename, you must create a target attribute named *Name* in the object type definition. You can associate any filename (without an extension) for a document. The importer automatically picks the extension of the original file or the file specified in rule *mc\_content\_location*. If the extension needs to be changed as well, use the system rule *fileExtension* in order to specify a new file extension. You can also change only the extension of a filename by setting *fileExtension* and not setting a new filename in the *Name* attribute.

**Example:**

Original content location: \\\Fileshare\Migration\Scan\566789\content.dat

<table data-header-hidden><thead><tr><th width="253">mc_content_location</th><th width="137">Name</th><th width="140">fileExtension</th><th>Result filename</th></tr></thead><tbody><tr><td>mc_content_location</td><td>Name</td><td>fileExtension</td><td>Result filename</td></tr><tr><td>-</td><td>-</td><td>-</td><td>content.dat</td></tr><tr><td>\\Fileshare\Migration\Conversion\invoice.pdf</td><td>-</td><td>-</td><td>invoice.pdf</td></tr><tr><td>-</td><td>MyContent</td><td>-</td><td>MyContent.dat</td></tr><tr><td>-</td><td>MyContent</td><td>pdf</td><td>MyContent.pdf</td></tr><tr><td>-</td><td>-</td><td>pdf</td><td>content.pdf</td></tr></tbody></table>

### Check-In Comment

The SharePoint Importer can set the check-in comment for documents. To set the check-in comment, you must create a target attribute named *checkin\_comment* in the object type definition. You can associate any string to set the check-in comment

### Author

The SharePoint Importer can set the author for list items, folders and documents. To set the author, you must create a target attribute named *author* in the object type definition. The value of this attribute must be the loginname of the user, who shall be set as author.

### Editor

The SharePoint Importer can set the editor for list items, folders and documents. To set the editor, you must create a target attribute named *editor* in the object type definition. The value of this attribute must be the loginname of the user, who shall be set as editor.

### Creation Date

The SharePoint Importer can set the creation date for list items, folders and documents. To set the creation date, you must create a target attribute named *created* in the object type definition. The value of this attribute must be any valid date.

### Modified Date

The SharePoint Importer can set the modified date for list items, folders and documents. To set the modified date, you must create a target attribute named *modified* in the object type definition. The value of this attribute must be any valid date.

### Lookup values

The SharePoint Importer can set lookup values. If you want to set a lookup value, you can either set the ID of the related item or the title. If you set the title of the document and there is more than one item with the same title in the lookup list, the SharePoint Importer marks your import object as an error, because the lookup item could not be identified unequivocally.

{% hint style="info" %}
The importer will treat any numeric value provided as the ID of the lookup value. In case you want to look up the value by title and the title is numeric, please surround the numeric value with " characters. The importer will automatically remove any " characters in the provided value before trying to match it with the title of the lookup field.
{% endhint %}

### URL values

The SharePoint Importer can set URL values. You can define a friendly name as well as the actual URL of the link by concatenating the friendly name with ;# and the actual URL.

**Example:** *migration-center;#<http://www.migration-center.com>*

### Taxonomy values

The SharePoint Importer can set taxonomy values and Migration Center provides two ways to do it. The first possibility is to use the name of the Taxonomy Service Application, a term group name, a term set name and the actual term. Those four values must be concatenated like the following representation:

`TaxonomyServiceApplicationName>TermGroupName>TermSetName>TermName`

**Example:** `Taxonomy_+poj2l53kslma4==>Group1>TermSet 1>Value`

The second possibility is to use the unique identifier of the term within curly brackets **{}**.

**Example:** `{2e9b53f9-04fe-4abd-bc33-e1410b1a062a}`

Multiple values can be set also but the attribute has to be set as a Multi-value Repeating attribute.

{% hint style="warning" %}
In case you receive an error on setting taxonomy values make sure the **TaxonomyServiceApplicationName** is up to date and valid since Microsoft changes the identifier at certain times.
{% endhint %}

## MIP sensitivity labels

The SharePoint Online importer supports applying **Microsoft Information Protection** (MIP) **sensitivity labels** on the content files before they get uploaded to SharePoint Online. \
To learn more about sensitivity labels, please see <https://docs.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels?view=o365-worldwide>.

#### Register an Azure AD app

The MIP software development kit provided by Microsoft that we use to apply the sensitivity labels on the content files requires you to register an application in your Azure AD. You could use the same app as in [Azure AD app-only principal authentication](#azure-ad-app-only-principal-authentication) or setup a separate application as described here: <https://docs.microsoft.com/en-us/information-protection/develop/setup-configure-mip#register-a-client-application-with-azure-active-directory>

You need to create a client secret for your registered application and configure the following access permissions:

![](https://content.gitbook.com/content/5ZddcKtrttWAxYuJdqkz/blobs/qGfjFFCmpmVu4iyDdoXL/Bildschirmfoto%202020-10-05%20um%2015.01.30.png)

#### Install VC++ Runtime

The Microsoft MIP SDK also needs the VC++ runtime installed on the job server machine to work properly. You might get a `LoadLibrary failed for: [C:\fme AG\migration-center Server Components 3.15\lib\mc-sharepointonline-importer\MIPService\x86\mip_dotnet.dll]` error if the VC++ runtime is missing and you want to apply sensitivity labels on your documents.

For your convenience, we provide the VC++ runtime installers in the `lib\mc-sharepointonline-importer\MIPService\VC_Redistributables` folder of your MC job server installation. Which variant to install (i.e. x86 or x64) depends on your .NET configuration. Usually you should install the x86 VC++ runtime (even on a x64 system). If that does not work, you should install the x64 variant.

#### Create the configuration file for the importer

The SharePoint Online classic importer requires you to provide several configuration parameters in a XML configuration file. You can find a template configuration file (`template-service.config`) in the `lib\mc-sharepointonline-importer` folder of your migration-center job server installation.

```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<appSettings>
		<!-- Azure App Settings  -->
		<add key="Azure.App.Id" value="<YOUR AZURE APP ID>" />
		<add key="Azure.App.Name" value="<YOUR AZURE APP NAME>"/>
		<add key="Azure.App.Version" value="1.0.0"/>
		<add key="Azure.App.Secret" value="<YOUR ENCRYPTED AZURE APP SECRET>"/>
		<add key="Azure.App.RedirectUri" value="<YOUR AZURE APP REDIRECT URL>"/>
		<add key="Azure.Tenant.Domain" value="<YOUR AZURE TENANT DOMAIN>"/>
		
		<!-- Optional: Use a temporary folder to store the labeled files. If empty, the labeled files will be placed next to their originals. -->
		<add key="Labeling.Temp.Folder" value="<OPTIONAL PATH TO LABELED CONTENT FOLDER>"/>

		<!-- File name prefix for the labeled files. -->
		<add key="Labeling.File.Prefix" value="lbld__"/>
	</appSettings>
</configuration>
```

Create a copy of the template file, fill in the required information from your Azure AD app that you had created in the previous step, and enter the full path to your config file in the `mipServiceConfigFile` parameter of your SharePoint Online importer. The result should look similar to the following:

```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<appSettings>
		<!-- Azure App Settings  -->
		<add key="Azure.App.Id" value="91583618-eb95-4ae9-8f9e-c5259491f66d" />
		<add key="Azure.App.Name" value="miptest"/>
		<add key="Azure.App.Version" value="1.0.0"/>
		<add key="Azure.App.Secret" value="0;#75+wbxpdQ0c=;#pp39p7v4QA57VKiP0NNcnuX/FEk2FiE8iD4PrJnysfLuDbNra2xsFHA2K9wAKG8z"/>
		<add key="Azure.App.RedirectUri" value="miptest://authorize"/>
		<add key="Azure.Tenant.Domain" value="migrationcenter.onmicrosoft.com"/>
		
		<!-- Optional: Use a temporary folder to store the labeled files. If empty, the labeled files will be placed next to their originals. -->
		<add key="Labeling.Temp.Folder" value="C:\Temp\sensitivity labeled docs"/>

		<!-- File name prefix for the labeled files. -->
		<add key="Labeling.File.Prefix" value="lbld__"/>
	</appSettings>
</configuration>
```

We provide a Java based command line tool for encryption, which you must use to encrypt the Azure.App.Secret value before you put it in the configuration file. To encrypt the secret, proceed as follows:

1. Open a command line window on the job server machine.
2. Switch to the `migration-center Server Components <version>\lib\mc-core` folder, e.g. `migration-center Server Components 3.16\lib\mc-core`
3. Run the following command: `java -cp mc-common-<version>.jar de.fme.mc.common.encryption.CmdTool`
4. The tool will ask for the text to encrypt. Enter or paste the secret value and press enter.
5. The tool will output the encrypted text. Copy and paste it into the configuration file.

## Performance

The performance of the import process is heavily impacted by some specific features, namely autoAdjustVersioning, autoAdjustAttachments, autoAddContentTypes, autoCreateFolders, setting taxonomy values, and setting system attributes like Author, Editor, Created, and Modified.

In case you are importing an update for a major version the increase can get up to three times compared to a normal document import. Combining all the above-mentioned features over the same document can increase the time for up to four times. Take this into consideration when planning an import as the time might vary based on the above described features.

You will achieve the highest import performance if you perform the appropriate configuration of your SharePoint Online system before you start the import and disabled the above-mentioned features in the SharePoint Online importer.

## Appendix

### List of possible list templates

<table data-header-hidden><thead><tr><th width="195.33333333333331">Template Name</th><th width="108">Template Identifier</th><th>Description</th></tr></thead><tbody><tr><td><strong>Template Name</strong></td><td><strong>Template Identifier</strong></td><td><strong>Description</strong></td></tr><tr><td>GenericList</td><td>100</td><td>A basic list which can be adapted for multiple purposes.</td></tr><tr><td>DocumentLibrary</td><td>101</td><td>Contains a list of documents and other files.</td></tr><tr><td>Survey</td><td>102</td><td>Fields on a survey list represent questions that are asked of survey participants. Items in a list represent a set of responses to a particular survey.</td></tr><tr><td>Links</td><td>103</td><td>Contains a list of hyperlinks and their descriptions.</td></tr><tr><td>Announcements</td><td>104</td><td>Contains a set of simple announcements.</td></tr><tr><td>Contacts</td><td>105</td><td>Contains a list of contacts used for tracking people in a site.</td></tr><tr><td>Events</td><td>106</td><td>Contains a list of single and recurring events. An events list typically has special views for displaying events on a calendar.</td></tr><tr><td>Tasks</td><td>107</td><td>Contains a list of items that represent completed and pending work items.</td></tr><tr><td>DiscussionBoard</td><td>108</td><td>Contains discussions topics and their replies.</td></tr><tr><td>PictureLibrary</td><td>109</td><td>Contains a library adapted for storing and viewing digital pictures.</td></tr><tr><td>DataSources</td><td>110</td><td>Contains data connection description files. - hidden</td></tr><tr><td>XmlForm</td><td>115</td><td>Contains XML documents. An XML form library can also contain templates for displaying and editing XML files via forms, as well as rules for specifying how XML data is converted to and from list items.</td></tr><tr><td>NoCodeWorkflows</td><td>117</td><td>Contains additional workflow definitions that describe new processes that can be used within lists. These workflow definitions do not contain advanced code-based extensions. - hidden</td></tr><tr><td>WorkflowProcess</td><td>118</td><td>Contains a list used to support execution of custom workflow process actions. - hidden</td></tr><tr><td>WebPageLibrary</td><td>119</td><td>Contains a set of editable Web pages.</td></tr><tr><td>CustomGrid</td><td>120</td><td>Contains a set of list items with a grid-editing view.</td></tr><tr><td>WorkflowHistory</td><td>140</td><td>Contains a set of history items for instances of workflows.</td></tr><tr><td>GanttTasks</td><td>150</td><td>Contains a list of tasks with specialized Gantt views of task data.</td></tr><tr><td>IssueTracking</td><td>1100</td><td>Contains a list of items used to track issues.</td></tr></tbody></table>

### List of possible list attributes

<table data-header-hidden><thead><tr><th width="228.33333333333331">Attribute</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Attribute</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>ContentTypesEnabled</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether content types are enabled for the list.</td></tr><tr><td>DefaultContentApprovalWorkflowId</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the default workflow identifier for content approval on the list. Returns an empty GUID if there is no default content approval workflow.</td></tr><tr><td>DefaultDisplayFormUrl</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the location of the default display form for the list. Clients specify a server-relative URL, and the server returns a site-relative URL</td></tr><tr><td>DefaultEditFormUrl</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the URL of the edit form to use for list items in the list. Clients specify a server-relative URL, and the server returns a site-relative URL.</td></tr><tr><td>DefaultNewFormUrl</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the location of the default new form for the list. Clients specify a server-relative URL, and the server returns a site-relative URL.</td></tr><tr><td>Description</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the description of the list.</td></tr><tr><td>Direction</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the reading order of the list. Returns "NONE", "LTR", or "RTL".</td></tr><tr><td>DocumentTemplateUrl</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the server-relative URL of the document template for the list. Returns a server-relative URL if the base type is <strong>DocumentLibrary</strong>, otherwise returns <strong>null</strong>.</td></tr><tr><td>DraftVersionVisibility</td><td><strong>Number</strong></td><td>Gets or sets a value that specifies the minimum permission required to view minor versions and drafts within the list. Represents an <strong>SP.DraftVisibilityType</strong> value: Reader = 0; Author = 1; Approver = 2.</td></tr><tr><td>EnableAttachments</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether list item attachments are enabled for the list.</td></tr><tr><td>EnableFolderCreation</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether new list folders can be added to the list.</td></tr><tr><td>EnableMinorVersions</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether minor versions are enabled for the list.</td></tr><tr><td>EnableModeration</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether content approval is enabled for the list.</td></tr><tr><td>EnableVersioning</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether historical versions of list items and documents can be created in the list.</td></tr><tr><td>ForceCheckout</td><td><strong>Boolean</strong></td><td>Gets or sets a value that indicates whether forced checkout is enabled for the document library.</td></tr><tr><td>Hidden</td><td><strong>Boolean</strong></td><td>Gets or sets a Boolean value that specifies whether the list is hidden. If <strong>true</strong>, the server sets the <strong>OnQuickLaunch</strong> property to <strong>false</strong>.</td></tr><tr><td>IrmEnabled</td><td><strong>Boolean</strong></td><td></td></tr><tr><td>IrmExpire</td><td><strong>Boolean</strong></td><td></td></tr><tr><td>IrmReject</td><td><strong>Boolean</strong></td><td></td></tr><tr><td>IsApplicationList</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies a flag that a client application can use to determine whether to display the list.</td></tr><tr><td>LastItemModifiedDate</td><td><strong>DateTime</strong></td><td>Gets a value that specifies the last time a list item, field, or property of the list was modified.</td></tr><tr><td>MultipleDataList</td><td><strong>Boolean</strong></td><td>Gets or sets a value that indicates whether the list in a Meeting Workspace site contains data for multiple meeting instances within the site.</td></tr><tr><td>NoCrawl</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies that the crawler must not crawl the list.</td></tr><tr><td>OnQuickLaunch</td><td><strong>Boolean</strong></td><td>Gets or sets a value that specifies whether the list appears on the Quick Launch of the site. If <strong>true</strong>, the server sets the <strong>Hidden</strong> property to <strong>false</strong>.</td></tr><tr><td>ValidationFormula</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the data validation criteria for a list item. Its length must be &#x3C;= 1023.</td></tr><tr><td>ValidationMessage</td><td><strong>String</strong></td><td>Gets or sets a value that specifies the error message returned when data validation fails for a list item. Its length must be &#x3C;= 1023.</td></tr></tbody></table>
