Overview
This article outlines the process for configuring Azure AD authentication for an on-premises deployment of M-Files. Note that this is an example process and may not fit your requirements as is. It may serve as a good starting point for planning your own deployment.
Solution
There are four main steps in configuring Azure AD:
- Configure an application in Azure AD to handle user sync and authentication.
- Configure user sync.
- Configure authentication.
- Map new login accounts imported from Azure AD to the old vault users.
Instructions for steps 1 and 2 are given here:
Configuring Azure Active Directory Synchronization Plugin
Instructions for configuring authentication are given here:
Configuring Vault Authentication with Azure AD in On-Premises Environments.pdf
When building the actual authentication configuration, add all settings marked as required in the document above and then add whatever settings are required in your environment. Then:
- Enable logging in the configuration.
- Try to log in and you will most probably get some error.
- Check the server logs for more details on the error.
- Check the documentation for more details on the setting reported in the error and make adjustments to the configuration.
- Try logging in again.
- Repeat until all errors have been addressed.
- Disable logging when the configuration works.
Follow this process to configure M-Files to use Azure AD:
- Create an empty test vault (or use an existing test vault if you have one readily available). Using a test vault for the configuration work makes sure that the configuration work does not interfere with the daily usage of your production vault(s).
- Configure user sync in the test vault.
- Import all users from Azure AD to the test vault. This will automatically create new Login Accounts for all the imported users, without adding new Users to the production vaults to clutter up the list of Users (this is another benefit of building the configuration in a test vault).
- Build the actual Azure AD authentication configuration in the test vault and test that it works. When you have a working configuration in the test vault, you can apply it to production vaults as outlined in the following steps.
- In the production vault(s) disable AD sync from all user groups that automatically sync users from your local AD.
- Copy the user sync and authentication settings from the test vault to your production vault(s).
- For testing purposes, link one or two of the existing Users in the production vault(s) to the new Login Accounts that were imported from Azure AD.
- Make sure that the configuration works with the accounts that were linked to the new Login Accounts. Adjust the authentication configuration if needed.
- Once the authentication configuration works in the production vault(s), link the rest of the Users in the production vault(s) to the new Login Accounts that were imported from Azure AD.
- Access the properties of the user groups that were originally synced from your local AD. Change them to sync with the corresponding groups in Azure AD and enable M-Files to check for changes every 15 minutes.
- Optional step: the test vault can be deleted when the configurations are working in production vaults.
Notes:
- For comprehensive details on M-Files' OAuth capabilities, refer to this document:
Configuring OpenID Connect and OAuth 2.0 for M-Files Authentication.pdf - All M-Files documentation related to federated authentication can be accessed via this page in the user guide:
https://www.m-files.com/user-guide/latest/eng/document_vault_authentication.html
