A short POC to demo APIM Consumption with policies to make a call to the custom backend authorization server to grab a token and inject them in backend API calls. You can find the ARM template sample on GitHub here.
Here is a short video that shows how to apply policies at the base level of all APIs.
Azure API Management DevOps Resource Kit
If you wish to implement CI/CD pipeline for APIM here, I will highly recommend looking at Azure APIM DevOps Resource Kit on GitHub.