Enable Self-Signed Certificates in Azure API Management Services

Azure API Management Services does work with self-signed certificates, however you need to enable that option first. You can only enable the self-signed certificates by using the APIM REST API (not in the portal). This is a complete example of how to make REST API call.

 

Enable APIM REST API

The first step is to enable API Management REST API
In the old Azure portal (manage.windowsazure.com) select your API Management services and click Manage
manage APIM

 

In the API Management portal go to the Security tab
Check the Enable API Management REST API checkbox
enable rest api

Generate a security token (highlighted button on the left)

Make a PUT call to APIM REST API

Call URL
https://myApimName.management.azure-api.net/backends/MyApiSuffix?api-version=2014-02-14-preview

Authorize the call by copy-pasting the access token string in its entirety into the authorization header.
Call Headers:

Authorization: SharedAccessSignature uid=XXXXXX
Content-Type: application/json

header

Call Body:

{
    "host" : "MyApiUrl.com",
    "skipCertificateChainValidation" : "true"
}

body

If you are still getting errors from the APIM, or simply want to see more information about your call, go ahead and enable trace on APIM calls (to be continued in a blog post)

A-a-and a mandatory meme 🙂

self signed doge

Leave a Reply

Your email address will not be published. Required fields are marked *