1

I have singlesignon enabled account. Using Authentication WSDL we are able to authenticate user now we need our application(C#) to search contact,Open new contact page in salesforce

Before singlesignon,we login into salesforce,search contact,open new contact all these scenarios acheived through "Enterprise WSDL"(using the session ID)

After singlesignon,We are not getting session id to do our search

Let me know is there is a way to handle these scenarios through C#.

  • Welcome to salesforce.stackexchange Prassana! It may help us understand your question if you share some of your code (the essential parts) and explain how you've implemented singleton specificly. – Samuel De Rycke Apr 3 '15 at 8:02
  • i am using enterprise API, how can i use the single sign on in that enterprise api service, currently i am providing username and password in Enterprise API service ,but now i have a single sign on URL, with that URL i can access the sales force without login.Now i need the same for enterprise API SForceService – Prasanna Kumar Apr 3 '15 at 11:34
  • Related question on the Developer Forums: How do i get SessionID using SingleSignOn enabled account. – Daniel Ballinger Jul 14 '15 at 1:16
0

My understanding is that the Authentication WSDL only provides you one operation/method - Authenticate. This takes the username, password and sourceIp as arguments and returns a boolean indicating if the user is authenticated or not.

E.g.

Request

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <Authenticate xmlns="urn:authentication.soap.sforce.com">
         <username>sampleuser@sample.org</username>
         <password>myPassword99</password>
         <sourceIp>1.2.3.4</sourceIp>
      </Authenticate>
   </soapenv:Body>
</soapenv:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <AuthenticateResult xmlns="urn:authentication.soap.sforce.com">
         <Authenticated>false</Authenticated>
      </AuthenticateResult>
   </soapenv:Body>
</soapenv:Envelope>

Can't you just use the username and password from above against the existing Enterprise API login method? You could also use them against the OAuth 2.0 Username-Password flow. Both will result in a usable SessionId / Access Token.

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.