Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Yes to the first question, and no to the second.
Inbound (App Service to APIM)
This works. Register an Entra application for the API, have the App Service managed identity request a token for that resource, and validate it in APIM with validate-azure-ad-token, which “enforces the existence and validity of a JSON web token (JWT) that was provided by the Microsoft Entra ... service for a specified set of principals in the directory.” List the App Service identity under client-application-ids or the API’s application ID under audiences. This runs inbound at any scope.
Outbound (APIM to AKS)
APIM does not acquire a token for you. The reference mentions it : “Token forwarding is the customer’s responsibility.” If your AKS service needs one, authentication-managed-identity “uses the managed identity to obtain an access token from Microsoft Entra ID for accessing the specified resource” and then “will set the value of the token in the Authorization header using the Bearer scheme.” APIM caches that token until it expires.
Two implications:
- If you add that policy, the backend sees APIM’s identity rather than the App Service’s, because the policy sets the
Authorizationheader. If you need the original caller’s identity downstream, carry it in a separate header. - “API Management doesn’t validate which backend the token is sent to”, so restricting which backends can receive it is on you.
If AKS does not require an Entra token, you do not need the outbound policy at all.
Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.