After changing the certificate, the AppServer search service to work, remove the pinnedpublickey field and its value from connectionStrings from the APIServer web.config file. This can be done by decrypting, updating connectionStrings and encrypting the web.config file using .Net Framework and restarting the IIS.
https://learn.microsoft.com/en-us/previous-versions/aspnet/zhhddkxy(v=vs.100)The decrypted connectionStrings should look like this before and after the change:
Before:
<add name="AppServerConnection" connectionString="QBM.AppServer.Client.ServiceClientFactory, QBM.AppServer.Client|url=https://iamapp1.iam.corp/appserver821/;pinnedpublickey="NiqXnbEJip8NOzIqMYiG58bp8NNmyE6fNgezMEds02g="" />
After:
<add name="AppServerConnection" connectionString="QBM.AppServer.Client.ServiceClientFactory, QBM.AppServer.Client|url=https://iamapp1.iam.corp/appserver821/" />