Our team is using Sitecore 10.1.2 with local environment hosted on developer machines, and deployed environments with K8s and Docker with Coveo serving all of those environments. Only in our deployed environments we are using federated authentication with Azure Active Directory but still using Sitecore's DefaultExternalUserBuilder
. Attached is our showconfig.aspx, after I am attempting to patch the externalUserBuilder
to use my assembly that I've created. As you can see, my patch is not showing up in the externalUserBuilder
section and still shows that is using Sitecore's default. If I am reading this correctly, it appears that Coveo is being patched in using the default Sitecore user builder.
My patch config is also attached.
From what I understand is that the Coveo config is patched in by http request which may be configured to use the Sitecore default builder. If that is a correct assumption. Would anyone know how to get around that to use my CustomExternalUserBuilder
?
2 Answers
Sitecore applies config in the order defined in layers.config.
The default order is:
- sitecore (i.e.
App_Config/Sitecore
) - modules (i.e.
App_Config/Modules
) - custom (i.e.
App_Config/Includes
) - environment (i.e.
App_Config/Environment
)
Based on the comments above, it sounds like you have tried manipulating the naming of your config file to be applied last (alphabetically) in the custom area.
If you have done this correctly and it has had no effect and layers.conig has not been customised. Then the only other possibility is that environment based configuration is overriding your attempts to patch the DefaultExternalUserBuilder
.
Please check the App_Config/Environment
folder to see if the Coveo file is present. If so and it need to remain, then you should be able to over ride by placing your file in the environment specific folder (ensuring its name begins later in alphabet - I.e. Z.yourfile.config).
Further information on configuration layers: https://doc.sitecore.com/xp/en/developers/103/platform-administration-and-architecture/configuration-layers.html
You should make sure that your config patch is applied after the Coveo config patch. You can create a folder with the name "ZZZ" move your config patch file inside this so that your config patch files will be applied at the end as per the alphabetical order.
Thanks
Coveo.Authentication.config
is being applied. It is only showing 3 other references that it is patching. Similar to the image I posted.