question

VenkateshSrinivasan-9013 avatar image
0 Votes"
VenkateshSrinivasan-9013 asked ggandhi commented

Excute script in Azure API Management

In APIGEE there is something called a javascript policy that allows me to execute a script. What is the equivalent of that in Azure API management

azure-api-management
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VenkateshSrinivasan-9013 and @MikeUrnun
et some workaround for this?

PS: Asked this one in community if anyone has done this: https://techcommunity.microsoft.com/t5/azure/how-to-generate-jwt-in-azure-api-management/m-p/3570721


I'm working on similar stuff and trying to generate JWT token within APIM using JavaScript to send to a external backend API.

Were able to g

0 Votes 0 ·

1 Answer

MikeUrnun avatar image
0 Votes"
MikeUrnun answered VenkateshSrinivasan-9013 commented

Hi @VenkateshSrinivasan-9013 - In API Management, you can use C# through policy expressions: API Management policy expressions


· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How will I execute the javascript using this policy expression? It says only C# expression.

0 Votes 0 ·
MikeUrnun avatar image MikeUrnun VenkateshSrinivasan-9013 ·

@VenkateshSrinivasan-9013 Unfortunately, within the proxy flow through the policy engine, only C# is supported at this time. If you feel strongly about Javascript support, please consider upvoting an existing feature request on Azure UserVoice: https://feedback.azure.com/forums/248703-api-management/suggestions/6564897-api-management-policy

0 Votes 0 ·
MikeUrnun avatar image MikeUrnun VenkateshSrinivasan-9013 ·

@VenkateshSrinivasan-9013 Is what you're trying to do only possible with JS?

0 Votes 0 ·