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

Error: Downloading the OpenID Provider metadata from the URI <Metadata Endpoint> failed

Last updated on 30 September 2024

Admin
AD FS Authentication

Overview

Even after setting all the mandatory fields shown in MFAdmin - Configuration - Federated authentication, the Login using OAuth or OpenID fails.

At the bottom of the error there is text similar to "Downloading the OpenID Provider metadata from the URI <Metadata Endpoint> failed." 

Symptoms

In a brand new setup the clients throws the error "Authentication Failed". Looking at the event viewer logs, You can see series of errors like below.

Authentication failed.

MFilesSession.cpp, 1789, Authentication failed. (0x8004001A)

MFilesSession.cpp, 3417, Authentication failed. (0x8004001A)

MFilesSession.cpp, 3614, Authentication failed. (0x8004001A)

MFilesSession.cpp, 4544, Authentication failed. (0x8004001A)

CoDialogs.cpp, 1388, Authentication failed. (0x8004001A)

CoDialogs.cpp, 1766, Authentication failed. (0x8004001A)

Authentication failed.

The authorization endpoint has not been specified. Check the "AuthorizationEndpoint" setting.

CoDialogs.cpp, 1676, Authentication failed. (0x8004001A)

CoDialogs.cpp, 1676, The authorization endpoint has not been specified. Check the "AuthorizationEndpoint" setting. (0x80131600)

One or more errors occurred.

RPCLoginNvsHelper.cpp, 2011, One or more errors occurred. (0x80131500)

RPCLoginNvsHelper.cpp, 1929, One or more errors occurred. (0x80131500)

OAuth

Updating configuration from the OpenID Provider metadata failed:

System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).

   --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

   at MFiles.AuthenticationProviders.OAuth.ServerAuthentication.ReadConfigurationFromMetadata(IStringDictionary configuration, IStringDictionary& commonConfiguration, IStringDictionary& clientConfiguration, IStringDictionary& serverConfiguration)

   at MFiles.AuthenticationProviders.OAuth.ServerAuthentication.UpdateConfigurationFromMetadata(IStringDictionary configuration, IStringDictionary& commonConfiguration, IStringDictionary& clientConfiguration, IStringDictionary& serverConfiguration)

---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).<---

Cause and Reason

Federated authentication settings have a key configuration item which is "OpenID Provider metadata URI".  It is also shown as "IdentityProviderMetadata" in the advanced tab. MFServer sends a http request to the corresponding identity provider to download the metadata JSON. This JSON data contains essential data that is required for the OAuth / OpenID authentication protocol.  If this http request fails for some reason, the "Updating configuration from the OpenID Provider metadata failed:" error occurs.

Solution

Check the URI configured in "IdentityProviderMetadata" is valid. You can test the URI in a browser opened on the M-Files Server, and make sure a valid JSON is downloaded and shown. Make sure that MFServer is connected to the Internet. If the identity provider is 3rd party like EntraID or OKTA, MFServer needs to connect to the Internet to download the metadata JSON. Check firewall rules or proxy settings and make sure that Internet access is allowed. A simple test can be done in the Internet Explorer browser at the server to check whether the Internet access is allowed from this server or not.

Still need help?