Policy Expressions - Custom Types

SeanN 21 Reputation points
2020-10-08T15:20:32.14+00:00

Hi,
I have an oAuth library, that I would like to reuse to offload to APIM.
https://learn.microsoft.com/en-us/azure/api-management/api-management-policy-expressions

Are custom assemblies supported in policy expressions? what approach do you suggest?

Thanks!
Sean

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

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2020-10-09T05:31:22.043+00:00

    Azure APIM doesn't support custom assemblies. Please feel free to raise a feature request to add support for this by sharing your use case.

    An alternative would be to have a function app using your custom assembly that is exposed over HTTP, which you could call from your policies using the send-request policy.

    Since this will be over the network, latency is something you would have to consider. You could address this in a couple of ways

    1. Add caching
    2. Deploy the function in the same region as the APIM Gateway. So, if you have multiple deployments of APIM, have a deployment of the function app in each region. Refer to this reference architecture that show cases this.
    0 comments No comments

0 additional answers

Sort by: Most helpful