I have been looking into getting information, such as Contacts from a Developer Salesforce account I have created. I downloaded the Sample .NET Console application from the Force.com Toolkit for .NET Github repository. However, I am getting an "Authentication Error" response when trying to authenticate using the OAuth key and secret ID's.

I haven't modfied the code from the Github sample in any way, so I am at a loss to why this error is being returned.

From reading multiple posts online, this is what I have done to try and fix the issue:

  • Created a new Connected App that has:

    • All users may self-authorize
    • Relax IP Restrictions
    • Application permission set to "Full Access".
    • Generated Consumer Key and Secret.
  • Generated a Security Token from my logged in account (that has full System Admin access)

  • Ensure the user role has API Enabled.

I am at a loss to what else I need to do in order to get API access.

Any help would be appreciated.


1 Answer 1


TLS 1.1 or 1.2 is required to access salesforce [always for sandbox, for prod depends on if the critical update is turned on]. Unfortunately the default TLS version for many versions of .NET is 1.0, which causes problems. See this issue in the toolkit project about TLS versions

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .