Courseiva

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

A company uses Azure API Management (APIM) to expose a set of REST APIs. A new requirement mandates that all API calls must be throttled per user based on usage tiers (Free, Basic, Premium). User identity is provided via a JWT token. Which policy should the developer configure in APIM to enforce this throttling?

⚠ Common exam trap

Azure often tests the distinction between rate limiting (short-term, sliding window) and quota (long-term, fixed window), and the trap here is that candidates confuse 'quota-by-key' with 'rate-limit-by-key' because both use a key, but quota is for total usage over a month, not per-second throttling.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

rate-limit-by-key policy

The rate-limit-by-key policy is correct because it allows throttling based on a specific key extracted from the request, such as the user identity from a JWT token. This policy enables per-user rate limiting by using a policy expression to extract the 'sub' claim or a custom claim from the JWT as the counter key, which maps directly to the usage tiers requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • rate-limit policy

    Why it's wrong here

    rate-limit applies globally, not per user.

  • rate-limit-by-key policy

    Why this is correct

    rate-limit-by-key can throttle based on a key extracted from JWT claims, enabling per-user throttling.

  • quota-by-key policy

    Why it's wrong here

    quota-by-key limits total calls over a period, not the rate.

  • IP-based throttling

    Why it's wrong here

    IP-based throttling does not consider user identity.

About these practice questions

Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.