Below is a short step-by-step tutorial on how to get private keys for OneDrive for Business.
- Go to Microsoft Azure Portal using your OneDrive for Business admin or Office 365 account
- Click on the Azure Active Directory
- Open App Registration subsection
- Add new registration by clicking the New Registration
- Specify the application name like SqlBak, leaving the Supported account types settings with the default value (Accounts in this organizational directory only (net.net only – Single-tenant)). For the Redirect URL, you have to specify https://sqlbak.com/oauth2/onedrive4business/. Please leave the type of the application as Web. Once the settings are made click on the Register button.
Note: Redirect URL must be specified exactly as in the blog post, including the trailing slash.
- Copy Application (client) ID and Directory (tenant) ID and paste them into the appropriate fields in the destination settings at your backup job settings
- Now go to the Certificates & secrets section and click on the New Client Secret button, specify any name and key expiration date. Then click on the Add button.
- Copy the secret key and past it into the appropriate field in the destination settings at your SqlBak backup job settings