Hi so i am trying to authorize the my org in vscode using the below documentation


but it gives error while using this command

sfdx force:source:deploy --sourcepath <source-dir> --targetusername <access-token>

on the place of <source-dir> i am adding localpath of my project and in place of <access-token> , i am adding access token but it return an error event not found

  • If its not working with SFDX, you can try native way help.salesforce.com/… With this you can use above link to login and then use sfdx force:auth:web:login to connect with user name and password. Then you need not to worry abt sessionid
    – Ysr Shk
    Jun 30 at 5:00
  • Is there a reason you're trying to use access token, instead of just authorizing a user as @YsrShk suggests?
    – pchittum
    Jun 30 at 14:18
  • obviously there is a reason why i am authorizing vs code using session id, as i dont have login credentials and i just work on clients project using session id only Jul 1 at 6:35
  • @MohammedsaeedBaig - in that case try one thing, try to ask client to login on his system using below command - sfdx force:org:display -verbose and it generates a URL(SFDX AUTH URL), which you can store in a txt file and login like this - sfdx auth:sfdxurl:store -f <path-to-sfdxAuthUrl-txt-file> -s -a MyDefaultOrg
    – Ysr Shk
    Jul 1 at 9:44

A command was recently added to the Salesforce Extension pack to authorize an org using a session ID. Look for 'SFDX: Authorize an Org using Session ID' from the command palette.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.