Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

Invalid token in JWT validation policy after changing from bearer token from jwt custom expression

公開日: Aug 6, 2025
解決策

SYMPTOM

During the configuration of the JWT validation policy you may encounter an error:
{
"error": "Invalid token."
}

And you are seeing this message after changing the validation from bearer token that worked without a problem to a custom token expression

CAUSE

This is a common error following the documentation after changing the bearer token to jwt custom token, it is not explained in the documentation since it is taking for granted the difference in the tokens.

SOLUTION

You are still using the bearer token instead of just sending the token. Bearer tokens and common tokens are different things so there is no need to send the "bearer" as the same as when you were using the authentication bearer for the JWT validation policy. This is explained in the documentation as: 
If you set this field to HTTP Bearer Authentication Header, the JWT is expected as Bearer.
If you set this field to Custom Expression, provide a DataWeave expression that returns the token.
ナレッジ記事番号

001122509

 
読み込み中
Salesforce Help | Article