Hi @Jack Jin MSFT Accenture , I understand that you want to detect the country of an IP address.
Azure Front Door and Azure App Gateway have WAF (Web Application Firewall) that enables you to filter requests only from a specific country based on requester IP address. However, it can only be used in WAF custom rule, with operator "GeoMatch" of "RemoteAddr" header value.
If you want to detect the country on an IP address in your app, you can use 3rd party API such as https://api.iplocation.net/ which will tell you the country_name and country_code2 (2-digit country code).
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.