
yet when i run:
sfdx force:auth:jwt:grant --clientid <my consumer key> --jwtkeyfile <path to key file> --username <my username> --setdefaultusername --instanceurl https://<sandbox>.<instance>.my.salesforce.com
i get the following error:
I've re-checked everything it says a thousand times and everything appears to be ok, any suggestions?ERROR: This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - audience is invalid
username: <my username>,
clientId: <my client ID>,
loginUrl: https://<sandbox>.<current instance>.my.salesforce.com,
privateKey: <path to my key file>
Try this:
Verify the OAuth configuration for this org. For JWT:
Ensure the private key is correct and the cert associated with the connected app has not expired.
Ensure the following OAuth scopes are configured [api, refresh_token, offline_access].
Ensure the username is assigned to a profile or perm set associated with the connected app.
Ensure the connected app is configured to pre-authorize admins.
Can you share the connect app image? and make sure your username is configured to pre-authorize admins