function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BomanIraniBomanIrani 

Mutual Authentication Certificate not being found.

Apex code cannot find Mutual Authentication Certificate!

I have uploaded a CA-signed (Wells Fargo) Mutual Authentication Certificate (unique name "WFACHCert")to my Sandbox org. This is in a txt/pem format. Now, when I tried to set the certificate on an HttpRequest by doing: 

HttpRequest req = new HttpRequest();
req.setClientCertificateName('WFACHCert');

I get the following exception thrown:

EXCEPTION: System.CalloutException: Could not find client cert with dev name: 'WFACHCert'

What am I doing wrong? Note that this certificate was generated from a CSR that was initiated outside of SFDC. By any chance, it is a requirement that CSRs for Mutual Authentication Certificates always be originated from within the SFDC environment? Thank you.
Raj VakatiRaj Vakati
Can you Query the Certificate from the developer name by using tooling API . 

And see whether its correct or not 

Select Id,DeveloperName,MasterLabel from Certificate
BomanIraniBomanIrani
All other certs get listed, except the Mutual Authentication Certificate. Possible that the CSR used to generate the MAC has also to be generated from SFDC?