Support

Documentation

OneDrive

[Note]Note

For use with the Upload to Microsoft OneDrive or OneDrive for Business post-processing engine.

This option is not available for "Upload to Microsoft OneDrive (App-Specific Folder)" or "Upload to Microsoft OneDrive (LEGACY)" for technical reasons.

Creating the custom helper
[Warning]Warning

This will ONLY work if you are creating an API application while logged in with a company account that has undergone the Microsoft Partner Network (MPN) verification, and you know your MPN ID.

[Note]Note

This needs to only be done once, on the site which you will be using to host the OAuth2 helpers. It may be the same, or a different site than the one you are going to use the helpers on.

Getting the Callback URL

Log into the backend of the site you want to host the OAuth2 helpers.

If you're on WordPress: go to Akeeba Backup.

Click on System Configuration.

Click on the OAuth2 Helpers tab.

Set OAuth2 Helper for OneDrive to Yes. You will see a blue note with three URLs below. Copy the Callback URL. It looks something like this (line breaks added for clarity):

https://www.example.com/index.php?view=oauth2&task=step2&format=raw&engine=onedrivebusiness

Copy this URL. Please remember that you need to use this URL verbatim in a later step.

Click on the Close button, without saving the component options.

Creating the API application

Log into the Microsoft Azure App Registrations page using your Microsoft account.

Click on New Registration.

Give the new API application a name. Under Supported account types select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).

Under Redirect URI (optional) click on the drop-down and select Web. In the text box next to it enter the Callback URL you copied earlier WITHOUT the ?option=com_akeebabackup&view=oauth2&task=step2&format=raw&engine=onedrivebusiness part. This is a weird requirement in the current iteration of Microsoft's API application interface.

Click on Register at the bottom of the page.

Click on the Branding & properties item on the sidebar.

Scroll down and enter your Microsoft Partner Network (MPN) ID.

[Important]Important

If you see a message similar to "The application publisher domain is set to something.onmicrosoft.com, but onmicrosoft.com publisher domains are not allowed. Please use a custom domain in order to proceed. Note: this domain must be a DNS verified domain on the tenant and match the primary contact domain for your MPN account." it means that you are logged in as a personal Microsoft account which DOES NOT allow you to create the kind of multi-tenant API application Microsoft requires for OneDrive to work properly. You have to go through the pain of figuring out how to get your business verified for the MPN programme, or just call it quits and use the OAuth2 helper we provide through our server.

We cannot provide any assistance on how to get your company MPN verified, and how to set up a Microsoft Azure API application linked to an MPN ID.

Click on Certificates and Secrets on the sidebar.

Click on the Client Secrets tab.

Click on New Client Secret.

Enter a description, e.g. My Custom OAuth2 on example.com.

Under Expires choose 730 days (24 months). Yes, this means that every two years you have to come back and do this all over again.

Click on Add at the bottom of the page. Wait. It takes a while.

Copy the Secret ID and Value.

Enabling the custom OAuth2 Helper

Log into the backend of the site you want to host the OAuth2 helpers.

If you're on WordPress: go to Akeeba Backup.

Click on System Configuration.

Click on the OAuth2 Helpers tab.

Set OAuth2 Helper for OneDrive to Yes.

Paste the Client ID (Secret ID) and Client Secret (Value) you copied in the previous step into the text boxes under the "OAuth2 Helper for OneDrive" section.

Click on Save & Close.

Using the custom helper
[Note]Note

This needs to be done on every Akeeba Backup installation and backup profile which will be using this custom OAuth2 helper. The site using the OAuth2 helper does not necessarily have to be the same site you have set up the OAuth2 helper on.

Getting the OAuth2 Helper and Refresh URLs

Log into the backend of the site which hosts the OAuth2 helpers.

If you're on WordPress: go to Akeeba Backup.

Click on System Configuration.

Click on the OAuth2 Helpers tab.

Find the OAuth2 Helper for OneDrive. You will see a blue note with three URLs below.

Copy the OAuth2 Helper URL and OAuth2 Refresh URL.

Telling Akeeba Backup to use a custom helper

Log into the backend of the site you will be taking the backups on. This may be different than the site which hosts the OAuth2 helpers.

If you're on WordPress: go to Akeeba Backup.

Select your backup profile, and click on Configuration.

Scroll down to the Post-processing Engine.

Select Upload to OneDrive and OneDrive for Business

Change the OAuth2 Helper to Custom.

Paste the OAuth2 Helper URL and OAuth2 Refresh URL you copied in the previous step.

Click on Save. This is important! Until you click on Save, Akeeba Backup does not know you intend to use a custom OAuth2 Helper.

Authentication and setup

When the page reloads, click on Authentication - Start here.

[Tip]Tip

You will know you are doing it right if the popup displays a warning letting you know what you are about to link it with an application which is not under the control of Akeeba Ltd. If you see the OneDrive interface, you missed the previous step (clicking on Save); in this case close the popup, click on Save, and then click on Authentication - Start here again.

Go through the authentication.

At the end, you will see an Access Token and a Refresh Token. Copy them into the respective fields of your Akeeba Backup profile.