# How to solve "Decryption failed. No Keys tried" error calling ValidateToken

**URL:** <https://community.auth0.com/t/how-to-solve-decryption-failed-no-keys-tried-error-calling-validatetoken/180079>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [February 3, 2025, 5:08am UTC](https://community.auth0.com/t/how-to-solve-decryption-failed-no-keys-tried-error-calling-validatetoken/180079 "2025-02-03T05:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill.rebey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bill.rebey/32/72075_2.png) [@bill.rebey](https://community.auth0.com/u/bill.rebey)\
**Post date:** [February 3, 2025, 5:08am UTC](https://community.auth0.com/t/how-to-solve-decryption-failed-no-keys-tried-error-calling-validatetoken/180079/1 "2025-02-03T05:08:47Z")

</div>

I could use a hand validating an Auth0 JWT from a .Net8 console app.

I’ve gone through numerous examples and searches, but can only get calls to SecurityToken.ValidateToken to throw an exception, complaining that “Decryption failed. No Keys tried”

Attaching screen shots of my Client TypeScript code, and my .Net8 code in my sample API endpoint.

Any help or insight would be appreciated.

Client code to get the Token from Auth0:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/6/6627a96ac0367232fd4837f8791815eb4b16a831.png)

Server code to validate it. The token itself shows up here looking just like it does on the client’s end before sending it to the server. The server seems to receive the Token just fine, as delivered in an HTTP Header. The last line throws the aforementioned error:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/a/5ac02015f5d75577425a0c548a05312ce8aea7e3.png)

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 3, 2025, 9:38pm UTC](https://community.auth0.com/t/how-to-solve-decryption-failed-no-keys-tried-error-calling-validatetoken/180079/3 "2025-02-03T21:38:21Z")

</div>

Hi @bill.rebey

Thank you for posting your question on the Auth0 Community!

Please take a look at this [community post](https://community.auth0.com/t/access-token-is-malformed-jwt-when-authenticating-with-google-oauth2/74218). As mentioned in there, when you are making a request to your `/authorize` endpoint, you might not be passing in `audience` parameter and you are receiving an opaque token which cannot be validated.

You can try to decode the current access token that your code receives on [jwt.io](http://jwt.io) to see if it is by any chance malformed.

Alternatively, as mentioned in our documentation about [Validating JTWs](https://auth0.com/docs/secure/tokens/json-web-tokens/validate-json-web-tokens), you can attempt to validate the token by using [Auth0’s Middleware](https://auth0.com/blog/how-to-validate-jwt-dotnet/#Validate-a-JWT--By-Hand-) or using a [3rd party library](https://jwt.io/libraries) from [jwt.io](http://jwt.io).

If you have any other question on the matter, feel free to leave a reply!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 17, 2025, 9:38pm UTC](https://community.auth0.com/t/how-to-solve-decryption-failed-no-keys-tried-error-calling-validatetoken/180079/4 "2025-02-17T21:38:58Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
