[SalesForce] How to know what certificate is associated with a connected app

I have a connected app and I would like to know what certificate it is associated with. How does one find out that information?

Best Answer

You can see the certificate's subject in the admin UI on the connected app details page (Setup > Build > Apps > Create ... find your app and click on the app name). The Digital Certificate field will show you the certificate's subject, it might look something like this:

C=USA, ST=CA, L=San Francisco, O=Salesforce.com, OU=00D..., CN=ACME Inc. 2020 12:00:00 GMT

To download the certificate in its entirety, you can pull the connected app definition via Metadata API using your favorite SF metadata-capable client (e.g. Workbench) with the following package.xml

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>NameOfMyApp</members>
        <name>ConnectedApp</name>
    </types>
    <version>47.0</version>
</Package>

Here's a redacted response, only the cert is shown for relevancy:

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
    <oauthConfig>
        <certificate>MIID2DCCAsACC...vO8w==</certificate>
    </oauthConfig>
</ConnectedApp>

The value of certificate element is PEM-encoded X.509 cert.

Related Topic