Home » A-Z guides to set up and use Wizdom’s modules » Export & Import » Export and Import scenarios

Export & Import scenarios

​​​​Move an entire Wizdom installation with all data and configurations

The migration/move of an entire Wizdom installation is done by following these steps one by one.​

If step 1 and 2 are completed without step 3. The installation will be in a state where it is not possible to upgrade or install

​​​​​​1. Backup-Restore of Wizdom SQL Database

This is done by standard Microsoft tools. Example Microsoft SQL Management Studio.

2. Copy Wizdom blob storage

AzCopy is a tool to upload, download and synchronize Azure blob containers.

2.1 Requirements

  • Download Microsoft Azure Storage Tools here: http://aka.ms/downloadazcopy
  • Aquire the Url for blobA and blobB on the container menu item under the storage container.​​
  • Aquire storage keys for BlobA and blobB on the dashboard for each storage container.​

2.2 Copy Wizdom blob files from BlobA to BlobB using powershell

$azPath = “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy”
Set-Location $azPath
# Storage account keys
$SourceKey = “”
$DestKey = “”
# Blob url ex. https://…../wizdom365secure
$SourcePrivate = “”
$DestPrivate = “”
# Blob url ex. https://…../wizdom365public
$SourcePublic = “”
$DestPublic = “​”
# folder to temporary store licensefile
$TempFileLocation = “D:\TempWizdomLicense”
#Temporary download license file
$Result = .\AzCopy /Source:$DestPrivate /SourceKey:$DestKey /Dest:$TempFileLocation /s /y /Pattern:”License”
#Copy entire blob
$Result = .\AzCopy /Source:$SourcePrivate /SourceKey:$SourceKey /Dest:$DestPrivate /DestKey:$DestKey /s /y​
$Result = .\AzCopy /Source:$SourcePublic /SourceKey:$SourceKey /Dest:$DestPublic /DestKey:$DestKey /s /y​
#Upload license file
$Result = .\AzCopy /Source:$TempFileLocation /Dest:$DestPrivate /DestKey:$DestKey /s /y

​2.3 Switches

  • /s to include folder structure
  • /y to overwrite files
  • /XO to only copy files where the source file is newer than the destination file.​

2.4 Resources

Invoke Wizdom change mappings endpoint

This can be invoked in two ways. Through Wizdom administration on the page “Change mappings” in the Export and import module, or through code with a http post request.

If the mappings are typed into the page in the Wizdom administratio​​​n it is possible to preview the post request. And then use this request to envoke the endpoint through code.​


The endpoint is available to all with Wizdom admin permissions or to everyone as long as the database is in a migrated state. Every time the endpoint is called the database change to active state.​ So after a database is migrated this endpoint is available to be invoked one time and one time only without Wizdom admin permissions.

Invoke from Wizdom admininstration

This funktionality can be invoked from the Wizdom administration module “Export and import” under “Modules”. The page “Change mappings” will display a list of “From” and “To” values. Most of the “From” values will be provided by the application when the page is displayed. The “To” values are for the user to provide. If nothings is typed into the “To” value, that mapping set will be ignored. So the user do not need to provide “To” values for all the mappings that should not be changed. The new mappings a applyed to Wizdom when the user click the “Apply mappings” button.

Invoke with Powershell​

Requires a trusted app registred in the domain.

  • Create a Native client application in the Azure AD
    • Minimal reguired permissions are
      • ​Windows Azure Active Directory : Sign in and read user profile
      • Office 365 SharePoint Online : Read items in all site collections
  • ​Download and install ADAL for PowerShell here: https://github.com/kenakamu/Microsoft.ADAL.PowerShell​
  • Run this Powershell:

​# Import Micrsoft.ADAL.Powershell module
Import-Module Microsoft.ADAL.Powershell

#ADAL – Creadentials
$user = “###”
$pass = “###”
#ADAL – authority ie. wizdom.onmicrosoft.com
$authority = “###”
#ADAL – clientId (guid)
$clientId = “###”
#ADAL – resourceId ie. https://wizdom.sharepoint.com/
$resourceId = “###”
#ADAL – accessToken
$accessToken = Get-ADALAccessToken -AuthorityName $authority -ClientId $clientId -ResourceId $resourceId -UserName $user -Password $pass

#The root of your Wizdom website ie. https://wizdom.azurewebsites.net
$wizdomHost = “###”
#A SharePoint sitecollection url ie. https://wizdom.sharepoint.com/sites/intranet
$sharepointHostUrl = “###”
$url = $wizdomHost + “/api/wizdom/exportimport/1/mappings” + “?sphosturl=” + $sharepointHostUrl
$headers = @{}
$headers[“Bearer”] = $accessToken
$headers[“x-wizdom-rest”] = “true”
#Request body – A json mapping schema
$postRequest = @”
“urls”: [
“from”: “”,
“to”: “”
“from”: “”,
“to”: “”
“domains”: [
“from”: “”,
“to”: “”
“from”: “”,
“to”: “”
“users”: [
“from”: “”,
“to”: “”
“clearAdminPermissions”: false

Invoke-WebRequest -Uri $url -Method Post -Body $postRequest -ContentType “application/json” -Headers $headers