Why do I receive the "Unable to get the access token" error when backing up SharePoint data to Boxafe?
Applicable Products
Boxafe
Root Cause
The “unable to get access token” error may occur because the ACS app-only access token has been disabled in your SharePoint Online account.
Apps using an ACS app-only access token are disabled by default in new Microsoft 365 tenants.
Solution
To grant Boxafe access permission to your SharePoint Online account you must enable the ACS app-only access token. You may need to set up SharePoint Online Management Shell before doing so.
Set up SharePoint Online Management Shell
- Download and install SharePoint Online Management Shell from http://www.microsoft.com/en-us/download/details.aspx?id=35588
- Open an elevated PowerShell prompt.
- Find the version of your SharePoint Online Management Shell by running the following command:
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
- If your SharePoint Online Management Shell version is earlier than 16.0.20912.12000, force install the latest module version by running the following command:
Install-Module -Force -Name Microsoft.Online.SharePoint.PowerShell
- If your execution policy is restricted, you must set it to unrestricted by running the following command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Enable ACS App-only Access Token
- Download and unzip Boxafe_Auth.ps1 (the Boxafe Auth Powershell Script) from https://www.qnap.com/images/faq/no.1149/Boxafe_Auth.zip
- Open an elevated PowerShell prompt.
- Run Boxafe_Auth.ps1
- If a confirmation message appears, press A.
- Enter the SharePoint admin site URL. For example: “http://contoso.onmicrosoft.com”
- The SharePoint Online login window appears. Sign in with your SharePoint Online account credentials.Note
QNAP does not save your SharePoint Online account credentials.
- PowerShell runs the Boxafe Auth PowerShell Script. When finished, press Enter.
- Log in to Boxafe.
- Follow the Boxafe user guide to Obtain Microsoft 365 Domain Authentication Credentials.