Prompt
What should I use with Azure API Management for API security?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
For API security in Azure API Management (APIM), the best choice depends on who is calling the API and what kind of protection you need. In practice, you usually combine authentication + authorization + network protection + throttling.
Common options to use with APIM
1) Microsoft Entra ID (Azure AD) + OAuth 2.0 / OpenID Connect
Best for:
- User-based APIs
- Enterprise/internal APIs
- Apps where callers can sign in with Microsoft identity
Use this when you want:
- JWT validation in APIM
- Role-based access control
- Delegated user access or app-to-app access
APIM can validate tokens using policies like:
validate-jwt
2) Subscription keys
Best for:
- Basic API access control
- Tracking usage per consumer/app
- Simple partner or developer portal scenarios
Important:
- Subscription keys are not sufficient alone for strong security
- They should be treated as a secondary control, not the main auth mechanism
3) Client certificates
Best for:
- Strong machine-to-machine authentication
- High-security enterprise integrations
- Mutual TLS scenarios
Use when:
- You need strong proof of caller identity
- You want to protect backend APIs from unauthorized clients
4) Managed identities
Best for:
- APIM calling other Azure services securely
- Avoiding secrets in code or config
Use this for:
- APIM → Azure Functions
- APIM → App Service / Key Vault / other Azure resources
- Backend-to-backend authentication without credentials
5) Network-level protection
Best for:
- Restricting exposure of APIs
Use:
- VNet integration
- Private endpoints
- IP allowlists
- Disable public access where possible
This is especially important if your APIs are internal or sensitive.
6) Azure WAF / Front Door / Application Gateway
Best for:
- Protecting against common web attacks
- Adding edge security and DDoS resistance
Use in front of APIM when you need:
- OWASP protections
- Bot filtering
- Geo/IP filtering
- Additional TLS/edge controls
Recommended security pattern
A strong default setup is:
- Microsoft Entra ID for authentication
- APIM validate-jwt for token validation
- Subscription keys for usage tracking and developer management
- Managed identities for backend calls
- Private networking where possible
- Rate limiting / quotas in APIM
- WAF if exposed publicly
Quick rule of thumb
- Public user-facing API → Entra ID + JWT validation
- Server-to-server API → Client credentials flow or client certificates
- Internal Azure-to-Azure calls → Managed identity
- Simple partner access → Subscription keys plus stronger auth if possible
If you want, I can suggest the best APIM security setup for your specific scenario:
- public API
- internal API
- partner API
- mobile app API
- microservices/backend-to-backend