October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Validate the JWT Audience Claim (`aud`)

Match JWT `aud` to the intended recipient under the application’s contract and token profile. Learn when missing or mismatched audiences require rejection.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate a JWT’s aud claim against the recipient value your application expects, using the rules of the token’s applicable profile. The claim may be one case-sensitive string or an array of strings. Reject the token when the receiving application is not represented as an intended audience—or when its profile requires an audience and the claim is missing.

What the JWT audience claim means

RFC 7519 defines aud as the recipients for which a JWT is intended. Each principal that processes the token must find itself among those recipients; if the claim is present and the processor does not identify itself in it, the JWT must be rejected. See RFC 7519 §4.1.3.

As an Amazon Associate I earn from qualifying purchases.

The general JWT format makes aud optional, but that does not make it optional for every deployment. The application contract or token profile may require it. RFC 8725 recommends that an issuer serving multiple relying parties or applications include an audience identifying the intended party, and that each recipient validate it and reject a missing or unassociated value. See RFC 8725 §3.9.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to check aud

  1. Identify the expected recipient. Get the expected audience value and its meaning from the issuer/application contract or the applicable token profile. RFC 7519 leaves interpretation application-specific: it is not necessarily a URL, client ID, or resource name.
  2. Read the claim’s permitted shape. aud can be a single string or an array of strings. Treat audience strings as case-sensitive.
  3. Apply the matching rule for the receiving application. Confirm that the expected recipient is represented according to the application’s contract and profile. Do not add normalization or equivalence rules unless that contract specifies them.
  4. Reject a token that fails the audience rule. Reject it if the expected recipient is not represented, or if the applicable profile requires aud and the claim is absent. Do not accept a token merely because its signature is valid: audience checking determines whether it was issued for this recipient.

How the rule differs across JWT and OAuth contexts

Context What aud identifies Rejection rule
Generic JWT (RFC 7519) The intended recipient or recipients, interpreted according to the application. If aud is present and the processing principal is not identified in it, reject the JWT. The general JWT format does not require the claim in every token.
JWT access token (RFC 9068) A resource indicator for the resource server receiving the access token. The resource server must reject the token unless aud contains a resource indicator for that server as a valid audience. See RFC 9068.
JWT assertion used for an OAuth authorization grant (RFC 7523) The authorization server. The token endpoint URL may be used as the audience value. The assertion’s aud must identify the authorization server. See RFC 7523.

Why an invalid-audience error occurs

An invalid-audience error means the value presented by the token did not satisfy the recipient’s expected audience rule. Common causes include a token issued for a different application or resource server, a mismatch in case, an incorrect expected value in the application’s configuration, or an absent aud where the active profile requires it. Compare the token claim with the issuer’s documented value and the profile for this token type; do not fix the error by accepting any audience or by guessing a universal audience format.

#1 Best Overall
BookFactory Security Pass Down Log Book, Wire-O, 100 Pages
  • Made in USA - Proudly produced in Ohio by a Veteran-owned business
  • Comprehensive Coverage: This BookFactory log book includes essential fields such as post/shift, time of change, date, weather conditions, and a designated space for detailed notes. This ensures that all relevant information is captured and easily accessible.
  • Sturdy Cover: The trans-lux cover protects the log book from wear and tear, ensuring its longevity and maintaining the integrity of your recorded data.
  • Essential Security Tool: This log book is an indispensable tool for any organization that values security and accountability. It helps to prevent misunderstandings, improve communication, and ensure a smooth transition between shifts.
  • Wire-O with Trans-lux cover, 100 Pages, Dimensions 8.5" x 11" - (Security-Pass-Down) Reorder SKU: LOG-100-7CW-PP(Security-Pass-Down)
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Audience validation is one part of JWT validation

An audience match alone does not establish that a JWT is trustworthy or otherwise valid. RFC 9068 separately requires resource servers to validate signatures of incoming JWT access tokens and specifies additional profile requirements. The audience check answers whether the token is intended for this recipient; it does not replace the other validation rules that apply to the token.

Rank #2
BookFactory Security Incident Report Log Book, Wire-O, 100 Pages
  • Made in USA - Proudly produced in Ohio by a Veteran-owned business
  • This BookFactory log book is for security guards in any sector or business. You can report location, circumstances and report number.
  • There are spaces to log the individual's names address, description and other identifying information. There are also spaces to note others involved, notes, and vehicle information if one was involved
  • Wire-O, 100 Pages, Dimensions 3.5" x 5.25"
  • Reorder SKU: LOG-100-M3CW-PP(Security-Report)

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.