This is more than a year old but I was looking for something like this so I'll share what I found hoping it saves people some time.
Basically, Mike is right, but the key to making it work without friction is a handy attribute in the validate-jwt policy.
You have three options to configure the source of the the token:
- header-name
- query-parameter
- token-value (bingo)
As explained in the documentation, you can define an "expression returning the token as a string". This basically allows you to get the token from anywhere in your context.
Cookies can be a bit tricky to read, so you can do something like this to save it as a variable:
https://stackoverflow.com/a/74036568/8835587
As a bonus, if working with AD B2C you can use this policy instead, which also supports token-value:
https://learn.microsoft.com/en-us/azure/api-management/validate-azure-ad-token-policy