Overview
If you have Azure AD authentication in your M-Files setup, you may find that you are unable to authenticate via Web and the following error message will appear:
AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption.
This does not affect authentication on Desktop, where you are still able to login to M-Files via Windows successfully.
Solution
To fix this, the Azure AD application settings must be adjusted.
- Find the Application (Client) ID of the application used for federated authentication in M-Files. This can be found in M-Files Admin under Configurations->Federation Authentication->Scopes->[scope name]->Configurations->[configuration name]->Settings->Client. You will see the needed ID in the "ClientID" field.
- Go to your Azure AD applications and find the application with the ID that matches the one used in your M-Files configuration.
- In the application, navigate to the Authentication tab under Manage.
- From there, check your platform configuration. If there is a "Single-page" application platform, try adding a "Web" platform with the same redirect URIs that are in the Single-page application platform.
After saving this change in Azure AD, you should be able to sign-in via Web using your federated authentication configuration with no errors.
