Could not find configuration node error on CD

In this article

Symptoms

When a Sitecore instance is configured as a content delivery (CD) server and Coveo for Sitecore isn’t activated, every Sitecore page on the instance throws the following error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[InvalidOperationException: Could not find configuration node: federatedAuthentication/identityProviders/identityProvider[@id='SitecoreldentityServer']]
Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert) +543
Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters., Boolean assert) +187
Sitecore.Configuration.DefaultFactory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +170
Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +116
Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
Sitecore.Configuration.DefaultFactory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +842

Cause

A configuration node in the Coveo for Sitecore Coveo.Authentication.config file, which should only apply to standalone and content management instances, was not properly set.

Resolution

The issue was resolved in the December 2020 release of Coveo for Sitecore.

Workaround

Important

To ensure you don’t copy a Coveo.Authentication.config file which still contains the error in the future, you should repeat the steps below on all of your CDs and CMs.

  1. Open the Coveo.Authentication.config file in your favorite text editor. It should be located in the <SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo folder.

  2. Locate the following line:

    <identityProvider id="SitecoreIdentityServer" ref="federatedAuthentication/identityProviders/identityProvider[@id='SitecoreIdentityServer']" />
  3. Replace this line with the following:

    <identityProvider role:require="Standalone or ContentManagement" id="SitecoreIdentityServer" ref="federatedAuthentication/identityProviders/identityProvider[@id='SitecoreIdentityServer']" />
  4. Save your changes.