Retrieving OAuth token for SalesForce spoke returns error "invalid_grant, user hasn't approved this consumer" when target is SalesForce sub-production environment.Issue You have configured SalesForce Spoke in your instance using the following documentation: https://docs.servicenow.com/csh?topicname=setup-salesforce.html&version=latest Then you test to manually get the OAuth Token for SalesForce using these steps: Navigate Connections & Credentials > CredentialsSelect the created 'SalesForce' Credentials.Click on related link 'Get OAuth Token' but, you will receive error: 'OAuth flow failed. Verify the configurations and try again. Error detail:invalid_grant, user hasn't approved this consumer' ReleaseAll supported ServiceNow releases.Sub-Production target SalesForce environment.CauseIncorrect Token URL set in the OAuth Application Registry record for SalesForce.The Token URL "https://login.salesforce.com/services/oauth2/token" is reserved for SalesForce production environments only. Since the setup will use a sub-production SalesForce environment, the Token URL will not work. SalesForce separates the Token URL for production and sub-production environments. Since this setup was configured to use a sub-production SalesForce environment, then the correct 'Token URL' is "https://test.salesforce.com/services/oauth2/token".ResolutionChange the Token URL value for the OAuth Application Registry for SalesForce using the next steps: Navigate System OAuth > Application Registry.Open the SalesForce application registry record.Proceed to change the Token URL field: From: "https://login.salesforce.com/services/oauth2/token" To: "https://test.salesforce.com/services/oauth2/token" This change will resolve the issue.