Hi @SidK ,
Thanks for reaching out to Q&A.
If you integrate APIM in front of app service, APIM maintains Client IP through context variable as follows: context.Request.IpAddress
The Client IP needs to be passed along to the App service by way of defining a header via a small policy snippet:
<set-header name="X-Forwarded-Client-Ip" exists-action="override">
The corresponding value then can be accessed in the app service code HttpRequest object as follows:
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
var clientIP = req.Headers["X-Forwarded-Client-Ip"]; ....
I hope using the client ip you will be able to figure out the client app. Feel free to reach out to me if you have any queries or concerns.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.
@SidK , Unfortunately, APIM doesnt have the client context apart from the client ip. You can send any additional headers from the client which can be identified at the server side.
In APIM you can create product and you can create different subscription for each client application. Then clients send subscription-key as parameter or header. Then in API Management Monitoring > Analysis -section you can filter using subscription.
It's also possible to create different products for each client application and client can use subscription-key from product. You can use use product to filtering in Analysis-section.