function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jay_58Jay_58 

OAUTH2.0 JWT: user hasn’t approved this consumer error

Error retrieving JWT bearer token for partner community users. Works fine for internal salesforce classic users. Connected app setup has "Admin approved users are pre-authorized" and so does "Perform requests on your behalf at any time (refresh_token)" checked along with other permissions on the app. The connected app also has the same permission set assigned that the partner user and the community has. Able to login directly to community with Partner community license user but fails to Get the JWT. Any known issue with partner portal and JWT? Or am I missing some config? Thanks in advance.
Alexandre Lachmann (SF)Alexandre Lachmann (SF)
You should change audience of your JWT from "https://login.salesforce.com" to your communite url "https://xxx.force.com"
Don't forget to change also your url+"/services/oauth2/token" : url = 1st or 2nd url
Regards