7

I have registered connected application with partner's SalesForce on Partner API level. Connected app have defined following scopes (id, web, api and refresh_token).

When I try to invoke SOAP API over username, password and session id combination (this is not OAuth2.0 protocol/access token combination) in old fashion style I'm getting : INVALID_SESSION_ID: This session is not valid for use with the API

When partner turned off in SF App Access Settings, (Setup -> Manage Apps -> Connected Apps) following parameter : Limit access to apps that are currently installed and have "Admin approved users and pre-authorized" as their Permitted Users setting our application was in position to smoothly communicate with SF SOAP API.

What does this mean ? What I have to change in my configuration. I have asked here is it possible to call SOAP API without access token (in old fashion) if you have registered application as connected app. I got answer Yes.

I do not know what I am doing wrong.

  • Can you paste the bodies (minus password/session) of your two SOAP requests into your question? – bigassforce Oct 14 '13 at 21:04
6

If the org has white listing turned on (e.g. only these approved apps can connect) then anything else won't be allowed to login. Is there a reason why you're not doing an oauth flow to authenticate your app, especially as you've defined a connected app for it.

Also, if you want to authenticate without using a users API security token, you'll need to do it via an interactive OAuth login flow. All the programmatic login flows require the users API security token (unless the login is from a white listed IP address).

  • If they have turned on mentioned restriction, that mean that our connected app can go only over OAuth ? I am not using OAuth flow here because I want to reuse existing code that is in production currently and that is working without OAuth 2.0. – Rastko Oct 15 '13 at 6:32
  • 1
    AIUI Only Oauth consumers can be white listed via the white listing feature, if you want to be able to be white listed, you'll need to be authenticating using an OAuth flow. – superfell Oct 15 '13 at 15:37
  • @superfell, Could you please point us to documentation regarding how to turn on/off "only approved connected app can login". I have similar issue and suspect the reason is the same. – Mike Raven Jun 2 '17 at 19:53

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.