IDX10206: Unable to validate audience. The 'audiences' parameter is empty. means the token has no aud claim while the API checks the audience. The client sees The audience 'empty' is invalid. Issue the token with the audience the API expects and the request is accepted.

The fix is on the side that creates the token: pass an audience when you build it. The API's audience check stays on. The short 'empty' text is in the response header; the IDX10206 line is in the server console, at Information level for Microsoft.AspNetCore.Authentication.

The error

The test's token maker takes - as the audience argument to leave aud out:

$token = .\mint2\bin\Debug\net10.0\Mint.exe "fix11-test-only-signing-key-0123456789abcdef" https://issuer.test - 30
curl.exe -i http://127.0.0.1:15600/patients -H "Authorization: Bearer $token"
HTTP/1.1 401 Unauthorized
Content-Length: 0
Date: Sat, 14 Nov 2026 01:26:32 GMT
Server: Kestrel
WWW-Authenticate: Bearer error="invalid_token", error_description="The audience 'empty' is invalid"

The server console:

info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[1]
      Failed to validate the token.
      Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10206: Unable to validate audience. The 'audiences' parameter is empty.
...

Why it happens

In the token maker, the audience goes straight into the JwtSecurityToken constructor; it was null here, and the API reported an empty audience list. The API has ValidAudience = "fix11-api", so there was a value to compare and nothing in the token to compare it with. The response text for this token was The audience 'empty' is invalid.

This is a different message from the wrong-audience case, run earlier on the batch's first API project (same key, issuer and ValidAudience): there the token had aud: other-api, the response said The audience '(null)' is invalid and the log said IDX10214. So in these two runs 'empty' came with no audience and '(null)' with a wrong one. https://issuer.test, fix11-api, other-api, the ports and the projects api2 and mint2 are the test's own.

The fix

The token maker's code, from the test's Program.cs:

...
string? audience = args[2] == "-" ? null : args[2];
...
var token = new JwtSecurityToken(
    issuer: issuer,
    audience: audience,
...

A token with the API's audience:

$token = .\mint2\bin\Debug\net10.0\Mint.exe "fix11-test-only-signing-key-0123456789abcdef" https://issuer.test fix11-api 30
curl.exe -i http://127.0.0.1:15600/patients -H "Authorization: Bearer $token"
HTTP/1.1 200 OK
...
["Maria Garcia","David Chen"]

Turning ValidateAudience off would let this token through by no longer comparing any token's audience with the API's name; that is the cost, so it is not the fix, and it was not run here.

How it was reproduced

A copy of the batch's first API project (made with dotnet new web -f net10.0) with Microsoft.AspNetCore.Authentication.JwtBearer 10.0.15 (Microsoft.IdentityModel 8.19.2), one endpoint protected with RequireAuthorization(), on 127.0.0.1:15600, ASP.NET Core 10.0.15 runtime, SDK 11.0.100. The token came from a copy of a console project made with dotnet new console, on System.IdentityModel.Tokens.Jwt 8.19.2 with a made-up test key, built with new JwtSecurityToken(...) and an audience of null. Requests went through curl 8.22.0 on Windows.

Frequently asked

What does IDX10206 The 'audiences' parameter is empty mean?
The token has no aud claim and the API validates the audience. In the test a token built with a null audience got this in the log and a 401.
Why does the response say The audience 'empty' is invalid?
In these runs that was the text for a token without an aud claim. A token with a wrong audience, sent to the batch's first API project, got The audience '(null)' is invalid instead.
How do I add the audience claim to a JWT in .NET?
Pass the audience when you create the token. In the test, new JwtSecurityToken with audience fix11-api produced a token that got a 200.

More decoded errors in the Fixes category. A token with the wrong audience is The audience '(null)' is invalid.