I have imported an Azure Function app into Azure API Management service, which automatically generates a host key on the Function app for authorizing calls against it.
I would like to inspect the associated policy (if one exists) and edit it, but I can't find it anywhere - it's not shown in "Policy fragments".
How can I view/edit the policy that adds the generated function key to calls against the Function app?
</>
.<policies>
<inbound>
<base />
<set-backend-service id="apim-generated-policy" backend-id="afreeen-fa" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
APIs --> Backends
blade of APIM instance.Click on the backend name and then navigate to Authorization credentials to access the x-function-key which is being passed in request header when you invoke an operation in APIM test console.
This is how APIM is storing the function key after importing a function app and using it via set-backend-service
policy.