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">
<value>@(context.Request.IpAddress)</value>
</set-header>
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.