Run an Automated Confluence to SharePoint Migration
Note: Automated migration is fully supported starting with v1.32.21 as setting the certificate password wasn’t possible in earlier releases and some quirks around certificate-based authentication have been resolved.
Normally you run WikiTraccs with a graphical user interface sometimes referred to as WikiTraccs.GUI. It is a distinct blue window. You enter the configuration and start the migration. When starting the migration, a second console application will open that is responsible for the actual migration - WikiTraccs.Console.
When looking into any WikiTraccs release file you download, you’ll find both WikiTraccs.Console.exe and WikiTraccs.GUI.exe in there.
You can use WikiTraccs.Console to automate your migration and skip the “human” part of the configuration.
Configuring WikiTraccs for Automation
Ignore WikiTraccs.GUI, find WikiTraccs.Console.exe.
Place an appsettings.json file in the same folder where you find WikiTraccs.Console.exe. When starting WikiTraccs.Console, it will read its configuration from this file.
Find sample configurations below.
For Confluence on-premises (PAT auth):
{
"CustomSettings": {
"Features": {
"InteractiveAuthKeepAliveEnabled": false
},
"AttachmentRegistryRootPath": "/tmp/wikitraccs-attachmentregistry",
"TempPath": "/tmp/wikitraccs-temp",
"TargetTenants": [
{
"HumanReadableId": "SharePoint",
"SharePointRootUrl": "https://contoso.sharepoint.com",
"Tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"AuthenticationType": "apponlywithcertificate",
"AuthenticationParameterSetAppOnlyAadCertificate": {
"CertificatePath": "/path/to/certificate.pfx",
"CertificatePassword": "YourPasswordHere"
},
"TargetSites": [
{
"HumanReadableId": "WikiTraccsDefaultTarget",
"SiteRootUrl": "https://contoso.sharepoint.com/sites/migration-target"
},
{
"HumanReadableId": "WikiTraccs",
"SiteRootUrl": "https://contoso.sharepoint.com/sites/wikitraccs-site"
}
]
}
],
"TransformationMappings": [
{
"SourceTenantHumanReadableId": "MyConfluenceOnPrem",
"TargetTenantHumanReadableId": "SharePoint",
"TargetSiteHumanReadableId": "WikiTraccsDefaultTarget"
}
],
"SourceTenantIncludeList": [
{
"TenantId": "https://confluence.mycompany.com",
"HumanReadableId": "MyConfluenceOnPrem",
"AuthenticationType": "bearer",
"PersonalAccessToken": "CONFLUENCE_PERSONAL_ACCESS_TOKEN",
"SpaceTransfer": {
"Enabled": true,
"SpaceIncludeList": [
{ "SpaceKey": "SPACE1" },
{ "SpaceKey": "SPACE2" },
{ "SpaceKey": "SPACE3" }
],
"Operations": [ "retrievecontents" ]
},
"PermissionTransfer": {
"Enabled": false,
"SpaceIncludeList": []
}
}
]
}
}
For Confluence Cloud (API Token Auth):
{
"CustomSettings": {
"Features": {
"InteractiveAuthKeepAliveEnabled": false
},
"AttachmentRegistryRootPath": "/tmp/wikitraccs-attachmentregistry",
"TempPath": "/tmp/wikitraccs-temp",
"TargetTenants": [
{
"HumanReadableId": "SharePoint",
"SharePointRootUrl": "https://contoso.sharepoint.com",
"Tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"AuthenticationType": "apponlywithcertificate",
"AuthenticationParameterSetAppOnlyAadCertificate": {
"CertificatePath": "/path/to/certificate.pfx",
"CertificatePassword": "YourPasswordHere"
},
"TargetSites": [
{
"HumanReadableId": "WikiTraccsDefaultTarget",
"SiteRootUrl": "https://contoso.sharepoint.com/sites/migration-target"
},
{
"HumanReadableId": "WikiTraccs",
"SiteRootUrl": "https://contoso.sharepoint.com/sites/wikitraccs-site"
}
]
}
],
"TransformationMappings": [
{
"SourceTenantHumanReadableId": "MyConfluenceCloud",
"TargetTenantHumanReadableId": "SharePoint",
"TargetSiteHumanReadableId": "WikiTraccsDefaultTarget"
}
],
"SourceTenantIncludeList": [
{
"TenantId": "https://mycompany.atlassian.net/wiki",
"HumanReadableId": "MyConfluenceCloud",
"AuthenticationType": "basic",
"BasicAuthUsername": "[email protected]",
"PersonalAccessToken": "ATLASSIAN_API_TOKEN",
"SpaceTransfer": {
"Enabled": true,
"SpaceIncludeList": [
{ "SpaceKey": "SPACE1" },
{ "SpaceKey": "SPACE2" },
{ "SpaceKey": "SPACE3" }
],
"Operations": [ "retrievecontents" ]
},
"PermissionTransfer": {
"Enabled": false,
"SpaceIncludeList": []
}
}
]
}
}
SharePoint Online Authentication Notes
The key part for SharePoint Online is this part of the appsettings.json:
"Tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"AuthenticationType": "apponlywithcertificate",
"AuthenticationParameterSetAppOnlyAadCertificate": {
"CertificatePath": "/path/to/certificate.pfx",
"CertificatePassword": "YourPasswordHere"
},
| Setting | Description |
|---|---|
| Tenant | The tenant ID (GUID) of your SharePoint Online tenant. |
| ClientId | The application (client) ID of the Entra ID app registration used for authentication. |
| AuthenticationType | Must be set to apponlywithcertificate for certificate-based app-only authentication. |
| CertificatePath | The file system path to the .pfx certificate file used for authentication. |
| CertificatePassword | The password protecting the .pfx certificate file. |
Refer to Registering WikiTraccs as App in Entra ID for instructions on creating the Entra ID app registration. Note that for app-only authentication you need to use application permissions instead of delegated permissions, and upload your .cer certificate file to the Entra ID app.
How to Cancel a Migration
WikiTraccs.Console will close automatically after migrating all pages from the configured selectors.
If you want to close WikiTraccs.Console prematurely, send Ctrl+C to the console window. Or just kill the process.
Wrap
Automating WikiTraccs is possible using appsettings.json.