Access token has two audiences?

How to get rid of multiple audiences?
This page says it is not supported

But somehow my token has an array of two audiences.


My .NET 5 application is failing because of this.

How can I make sure my token only contains one audience?

Btw I’m using angular and the oidc-client package for authentication in my front-end.
I’m passing in my audience like this

Because it says I have to pass an audience in to retrieve my token in JWT format.

Hey @woeterman94 ,

You cannot remove the /userinfo audience. It is included by default for all issued Access Tokens.

If you specify an audience of your custom API identifier and a scope of openid, then the resulting access token’s aud claim will be an array rather than a string, and the access token will be valid for both your custom API and for the /userinfo endpoint. Other than in the use case of a single custom API as well as Auth0’s /userinfo endpoint, your access tokens will be unable to have two or more audiences.

I am not familiar with your application, but it seems like it is parsing the audience incorrectly. That’s what you should focus on.

More information about this topic can be read here: Get Access Tokens