question

SenthilKumarUlaganathanC-9937 avatar image
0 Votes"
SenthilKumarUlaganathanC-9937 asked AkashNiteenMahale-2786 edited

How to create or sign JWT token in AZURE APIM

Hi,

I need to create the JWT in APIM policy. where I need to create the JWT that includes JWT Header, JWT payload Or claims and JWT signature (using the private key).

Any leads or links that would help me a lot.

Struggling on this for the last few days.

Thanks,
Senthil.U

azure-api-management
· 2
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 @SenthilKumarUlaganathanC-9937 & @MayankBargali-MSFT,

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

Were you able to get this working?

I have put this post on MS techcommunity as well with all the details to check if anyone got this working: https://techcommunity.microsoft.com/t5/azure/how-to-generate-jwt-in-azure-api-management/m-p/3570721

Thanks
GGandhi


0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered

@SenthilKumarUlaganathanC-9937 Apology in reaching out. If your requirement is that you want to create the JWT token and pass the same to your backend then API Management Policy for Access Token Acquisition, Caching and Renewal article have the details how this can be achived. This document cover how to acquire access token from Azure AD thru client credentials flow.

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.