Using Modern Authentication (oAuth) with Archive Shuttle
Archive Shuttle can be configured to use oAuth to authenticate with Microsoft Office 365, using a Certificate and/or Secret. Please read the step-by-step guide below on how to configure oAuth using Secret and a certificate.
Note: oAuth is currently supported over both Exchange and PowerShell endpoints in AS 10 or above.
Note: If you would like to use oAuth, please install Azure Active Directory Powershell Module V2, as oAuth only supports Azure AD PowerShell. For more on this, click here.
Be aware you must select ONE method of authentication with your Archive Shuttle project; either basic authentication or oAuth authentication. Mixed authentication is not available. However, you still require an account with Global Administration rights with Archive Shuttle 10.1. in Credentials Editor. Minimum permissions required for the account are listed
here.
Configuring Modern Authentication (oAuth) with a Secret
Step 1: Create a new Registered Application in Azure
To get an application ID:
- Go to https://portal.azure.com and log in to your Office 365 tenant with an administrator account.
- From the left menu, select Azure Active Directory > App registrations.
- Click New registration.
- Enter a name.
- From the Supported account types, select Supported Account Type – Single tenant.
- Don’t enter anything for Redirect URI (optional). Leave it as it is.
- Click Register.
- Copy the Application (client) ID and save it somewhere secure that you will remember. You will need it later.

Step 2: Configure Permissions, Roles and Secret
Configure Application Permissions: Return to the Azure portal and access Azure Active Directory > App registrations > owned applications. Then find the application you created in Step 1 above.
- Select your application, and then select API Permissions.
- Click Add a Permission.
- In the Request API permissions section > Select APIs my organization uses, search for Office 365 Exchange Online and select this API.
- Click Application Permissions
- In the Permissions list section, select the full_access_as_app listed in this article.
- Click Add permissions.
- Click Grant Admin consent.
Assign User Administrator role to the registered Application:
- From the left menu, select Azure Active Directory > Groups and create New group.
- For Group type choose Security and enter a descriptive name.
- Go to Members > Add members and search for Application created in Step 1 above.
- Click Select and then Create the group.
- Go back to the created group, select Azure Active Directory > Groups.
- Search for group you have created and open it.
- Select Assigned roles (Preview) > Add assignments and search for role User administrator.
- Click Add.
Configure Application Secret:
- Go to Certificates & Secrets and click the New Client Secret button.
- Enter a descriptive name.
- Choose an Expiry duration for the Secret. (It is recommended to set the secret to not expire.)
- Click Add.
- Copy the Secret created and save it somewhere. You will need it later.
Step 3: Add your Application ID and Secret on the server running the Archive Shuttle O365 Import module.
To do this:
- In Archive Shuttle, open the Credential Editor while logged in as the account the module is running under.
- Select the Office 365 oAuth tab and click Add.
- Enter the Name (free format text), Application ID, Tenant (eg. tenant.onmicrosoft.com) and Secret.
- Save and close the Credential Editor.
- Open the Archive Shuttle Administrator Console.
- Click Configuration > System Configuration.
- Go to the O365 module settings and enable the option to Use modern authentication (oAuth).
- Restart the O365 module to force settings to take immediate effect.
Configuring oAuth with a certificate
Step 1: Create a new Registered Application in Azure
To get an application ID:
- Go to https://portal.azure.com and log in to your Office 365 tenant with an administrator account.
- From the left menu, select Azure Active Directory > App registrations.
- Click New registration.
- Enter a name.
- From the Supported account types, select Supported Account Type – Single tenant.
- Don’t enter anything for Redirect URI (optional). Leave it as it is.
- Click Register.
- Copy the Application (client) ID and save it somewhere you will remember and securely. You will need it later.

Step 2: Add a certificate to the server running the O365 module.
For this step you will need a SHA-1 certificate that will be used to establish a secure connection from this workstation to O365. This can be done with a certificate from a trusted certificate authority or a self-signed certificate. Below we assume you do not have a trusted certificate to use and need to create a certificate to use. There are many ways to create a certificate on a Windows server and below we are using PowerShell modules.
To create a self-signed certificate in Windows Server 2016:
- Access the server where the O365 module is installed.
- Launch PowerShell and type the following commands:
# Create certificate
$cert=New-SelfSignedCertificate -Subject “CN=ArchiveShuttleoAuth” –CertStoreLocation “cert:\CurrentUser\My”-KeyExportPolicy Exportable -Provider ‘Microsoft RSA SChannel Cryptographic Provider’-NotAfter (Get-Date).AddYears(5)
$password=ConvertTo-SecureString -String “UseSecurePasswordHere”-Force –AsPlainText
$localPath=’D:/Temp’
# Used for authentication -> load it from disk
Export-PfxCertificate -Cert $cert –FilePath ($localPath.Path+”\ArchiveShuttleSelf.pfx”) -Password $password
# Export certificate to a .cer file:
Export-Certificate -Type CERT -Cert $cert –FilePath ($localPath.Path+”\ArchiveShuttleServer.cer”)
* Where “UseSecurePasswordHere” is the desired password of the certificate.
To add an untrusted certificate to your bridgehead server’s local certificate store:
- Access the server where the O365 module is installed.
- Open the certificates manager by start/run certlm.msc
- Expand Trusted Root Certificate Authorities > Certificates.
- Right-click Certificates and select All Tasks > Import… to launch the Certificate Import Wizard.
- Locate the (.cer) certificate file and follow the wizard prompts.
- Supply password, if required.
- Right-click Certificates and select All Tasks > Import… to launch the Certificate Import Wizard.
- Locate the (.pfx) certificate file and follow the wizard prompts.
- Supply the password, if required.
Step 3: Get a Thumbprint.
To get a thumbprint:
- Return to the Azure portal and access Azure Active Directory > App registrations > owned applications, and find the application you created in Step 1 above.
- Select your application, and then select API Permissions.
- Click Add a Permission.
- In the Add API access section > Select an API, choose Exchange.
- In the Select permissions > Enable Access section, select the option to Use Exchange Web Services with full access to all mailboxes. (full_access_as_app)
- Click Add permissions.
- Click Grant Admin consent.
- Go to Certificates & Secrets and click the Upload Certificate button.
- Upload your certificate file from Step 2.
- Copy the certificate Thumbprint and save it somewhere. You will need it later.
Step 4: Add your Application ID and Thumbprint on the server running the Archive Shuttle module.
To do this:
- In Archive Shuttle, open the Credential Editor while logged in as the account the module is running under.
- Select the Office 365 oAuth tab and click Add.
- Enter the Name (free format text), Application ID, Thumbprint, and Tenant (eg. tenant.onmicrosoft.com)
- Save and close the Credential Editor.
- Open the Archive Shuttle Administrator Console.
- Click Configuration > System Configuration.
- Go to the O365 module settings and enable the option to Use modern authentication (oAuth).
- Restart the O365 module to force settings to take immediate effect.