Forum Discussion

GGandhi's avatar
GGandhi
Copper Contributor
Jul 12, 2022

How to Generate JWT in Azure API Management

Hello Members,

I'm trying to secure a backend external API through Azure API Management platform. The backend API needs and validates the request using a JWT(JSON Web Token).

I have spent quite some time in searching and trying different option on how to generate a JWT token in APIM before calling the backend API, but yet to get it working. 

I have working JavaScript code which can generate JWT for backend, but JavaScript is not supported in APIM. 

Have anyone tried/implemented this before?

PS: The JWT generation just require UserId, Secret and key. No calls to backend. Similar to one here: https://jwt.io/

 

1 Reply

  • APIM is act as a proxy and can't generate JWT token, you can do JWT validation using APIM policy.

Resources