I have stored a named value based on the user id, so I can identify the payload submitter, with a reference of my choosing.
When I use the policy below, I get the value as a string, rather than actually looking up the named value. If I simply write the user id inside the double curly brackets rather than getting it dynamically from the context, the lookup works fine and it substitues with the named value I want.
Is it not possible to do in a simple manner?
<policies>
<inbound>
<set-header name="x-request-context-data" exists-action="override">
<value>{{@(context.User.Id)}}</value>
</set-header>
</inbound>
</policies>
Output:
x-request-context-data: {{@(context.User.Id)}}