I am attempting to authorize a developer Sandbox using JWT in an attempt to implement a CI process. I found this related question on the subject:
I have attempted to follow the advice given there. I am able to use JWT in my production org without any issues. The sandbox I am attempting to auth into was created off of production, so the connected app that I use in production is also in the Sandbox, but with a different client secret. However when I try to authorize into the sandbox:
sfdx force:auth:jwt:grant --clientid <clientId-from-sandbox> --jwtkeyfile <path-to-server.key> --username <sytem-admin> --instanceurl <instance-url-for-sandbox>
I get the following error:
ERROR: This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - audience is invalid
Anyone have any idea what I'm doing wrong here?