Email archiving icon

Documentation

Learn More

Set up Microsoft 365 archiving & backup

Prepare your Microsoft 365 account for MailVault access

MailVault needs the appropriate credentials and permissions to access information from your Microsoft 365 account.


Registration and Setup Microsoft 365 credentials and permissions

To allow authentication, you first need to register your application at Azure App Registrations.

  1. Login in Azure Portal, using the credentials of the account for which you need to enable API.
  2. Select "Azure Active Directory" from the left pane.
  3. Select "App registrations".
  4. Click on "New Registration and follow the steps below.
    EN_01_Mailvault_Office_365_Backup
  5. In Supported account types choose "Accounts in any organizational directory and personal Microsoft accounts".
  6. Go to "Redirect URL (optional).
  7. Click under the drop-down field “Select platform” and select "Web".
  8. Set the redirect URI (Web) to: https://login.microsoftonline.com/common/oauth2/nativeclient
  9. This needs to be inserted into the "Redirect URI" text box and it’s the default redirect URI used by this library.
  10. Click on the "Register" button.
    EN_02_Mailvault_Office_365_Backup
  11. You will now see the Overview page of the application you have created.
  12. Click on "API permissions" in the left pane.
    EN_03_Mailvault_Office_365_Backup
  13. Click on "Add a permission" and choose "Microsoft Graph".
    EN_04_Mailvault_Office_365_Backup
  14. Click on "Delegated Permissions" and add all options shown in step 16.
  15. Click on "Application Permissions" and add all options shown in step 16.
    EN_05_Mailvault_Office_365_Backup
  16. All required permissions:

  17. In the API permissions section, click on "Grant admin consent for <your_company_name>".
    EN_07_Mailvault_Office_365_Backup
  18. Click on "Yes" in the pop-up that appears and save.
  19. Click on "Certificates & secrets" from the left pane.
    EN_08_Mailvault_Office_365_Backup
  20. Click on "New client secret". Set the expiration to 24 months.
    EN_09_Mailvault_Office_365_Backup
  21. Important: Write down the value of the client secret created now. It is required going ahead but will not be visible here later
    EN_10_Mailvault_Office_365_Backup
  22. Now go to the Overview section in the left pane.
  23. Copy the values of Application (client) ID and Directory (tenant) ID and save them. You will need these values later.
    EN_11_Mailvault_Office_365_Backup
  24. The service account is created and now able to back up the Microsoft 365 we will require the Application (client) ID, Directory (tenant) ID, and Client secret key (see step 21).