I want to be able to login via a .NET app using a custom login page on my app so I want no redirection to the salesforce login page. I want the process to be internal.  So how can I implement a way that would allow me to retrieve the security token from the API using the login and the password that a user would input in my login page?  If that's not possible, what other ways can I use to keep the login process stricly on my app and just use the login and password?


You would call login(). To do this, go to Setup > Develop/Integrations > API, download the Enterprise or Partner WSDL, import the WSDL in to your IDE, and call the login method from the client stub. The resulting session ID can be used for basically any type of API call, including REST and SOAP calls.

  • Thank you, so this is the only way I can do it or is there another option? Also could you provide me with useful documentation or a tutorial if possible regarding the client stub I'm not familiar wih it – dotname Feb 15 '19 at 11:18
  • @dotname Other login methods require using the Salesforce login endpoints. – sfdcfox Feb 15 '19 at 14:38

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.