Microsoft Dynamics 365 Business Central development team has introduced with 16.4 a new configuration parameter, in addition to the existing ones, to get or set the certificate common name (or Subject)
The scope and intention of this key was to be used with SaaS (per se or Embedded Apps).
Since 16.4, it might happen that service tier is loading another certificate than the one that has been configured or setup if the common name has not been specified. This lead to web client not able to connect anymore
And an error in the application log like
Error accessing Website
Type: Microsoft.Dynamics.Nav.Types.NavServerNotFoundException
Message: The client could not establish a connection to the Microsoft Dynamics 365 Business Central Server.
Reason = "Configuration setting 'DnsIdentity' has an invalid value"
Description = "The Identity check failed for the outgoing message. The remote endpoint did not provide a domain name system (DNS) claim and therefore did not satisfied DNS identity 'XXXXXXXX'. This may be caused by lack of DNS or CN name in the remote endpoint X.509 certificate's distinguished name."A server was not found at "YYYYYYYY". Either the URL is incorrect or the server is currently not available.
StackTrace:
The same issue has also been reported in this community post
The potential mitigation to resolve this issue is to add the following key in the customsettings.config file
<add key="ServicesCertificateCommonName" value="<SubjectName" />
Where SubjectName is the Subject Name of the certificate as shown below
To give an example, if your Subject is
CN = *mydomain.it
OU = Domain Control Validated
Then key has to be set like
<add key="ServicesCertificateCommonName" value="mydomain.it" />
NOTE: Remember to restart the service tier once you have added the aforementioned key.
tanks
IMPORTANT NOTE AND UPDATE:
The affected minor releases are 16.4 - 16.5 -16.6 - 17.0
Since November CUs (16.7 and 17.1) onwards, a platform change has been introduced to resolve this problem and it is no longer needed nor mandatory to set ServicesCertificateCommonName in customsettings.config file
Sohail Ahmed
911
YUN ZHU
834
Super User 2025 Season 1
Mansi Soni
602