Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

Azure AD: Proof Key for Code Exchange is Required for Cross-Origin Authorization Code Redemption

Last updated on 25 September 2023

Admin
Microsoft Entra ID Authentication

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.

image.png

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. 

  1. 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. 

image.png

  1. Go to your Azure AD applications and find the application with the ID that matches the one used in your M-Files configuration. 
  2. In the application, navigate to the Authentication tab under Manage. 
  3. 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.

image.png

After saving this change in Azure AD, you should be able to sign-in via Web using your federated authentication configuration with no errors. 

Still need help?

On this page