How to add a certificate to API Management Credential Manager

JavaJeff 0 Reputation points
2025-05-05T21:17:35.67+00:00

I have an external token endpoint that requires a certificate to interact with it (along with client-id and secret). I'd like to leverage the APIM Credential Manager to handle the authorization calls and caching. However, when I set up the Credential Manager there is no place to assign the certificate that needs to be used with the token service. Without it the authorization can't be completed.

I tried adding the cert with the authentication-certificate policy referencing the certificate uploaded to APIM before the get-authorization-context policy but that didn't work, just returned a 500 response.

       <authentication-certificate certificate-id="cert-Integrations-Dev" />
        <get-authorization-context provider-id="token-oauth" authorization-id="cred-conn-oauth" context-variable-name="auth-context" identity-type="managed" ignore-error="false" />
        <set-header name="Authorization" exists-action="override">
            <value>@("Bearer " + ((Authorization)context.Variables.GetValueOrDefault("auth-context"))?.AccessToken)</value>
        </set-header>

Is this possible? Or is there a way to reference the certificate in the Credential Manager?

Thank you.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,385 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.