How to add a certificate to API Management Credential Manager
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.