0

Let's say I'm using POST with body example

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:urn="urn:partner.soap.sforce.com">
    <soapenv:Body>
    <urn:login<urn:username>unemae</urn:username><urn:password>pass+securityToken</urn:password</urn:login>
    </soapenv:Body>
    </soapenv:Envelope>

There is sessionSecondsValid tag with value of 3600 in response but i always get the same sessionID value for this user. What's wrong?

2
  • Just a though. Is not this a normal behaviour, session Id would change if you logout and login again. Isn`t it the same when you have an active session and you open the SF from the WEB UI and instead of login screen, it just takes you to the desired place without asking for new login? When you are logged in in an Org, you can not get to login screen you have to logout first to end your session. – Boris Gichev Jan 11 at 15:19
  • Nope, this user is an integration (server) user. Should I every time logout that user from remote server? – pincet Jan 11 at 16:25
0

Generally speaking there isn't anything wrong with getting the same sessionId back from a login API call. You will continue to get that same session ID back for that user until it either expires or is intentionally invalidated.

By default the expiration is sliding and will have a timeout of two hours. The behaviour can vary based on the org configuration.

You could intentionally call logout to invalidate it, but that is typically where you discover that there are other integrations operating for that same user and you just logged them out as well.

If you know that the integration user is only being used by this one application then you could explicitly call logout.

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.