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

Valid JSON Boolean value without quotes can break the configuration

Last updated on 9 January 2024

Admin
M-Files Admin

Overview

When editing configuration for Federated Authentication, you may go to the Advanced tab and set values there directly.

In the case of Boolean values that you may enter without quotation marks, such as

"PreserveClientSideSettings_UseIdTokenAsAccessToken" : true

You may get errors similar to:

Updating configuration from the OpenID Provider metadata failed:

System.FormatException: String was not recognized as a valid Boolean.

   at System.Boolean.Parse(String value)

   at MFiles.AuthenticationProviders.OAuth.ServerAuthentication.CanOverwrite(IStringDictionary configuration, String configurationSectionName, String settingName)

   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)

Solution

While a plain word true (without quotation marks around it) is a valid Boolean value in JSON, you need to enclose it in quotation marks, for example:

"PreserveClientSideSettings_UseIdTokenAsAccessToken" : "true"

Still need help?

On this page