I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end.

Upon reviewing the oAuth flow options (http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#CSHID=quickstart_oauth.htm|StartTopic=Content%2Fquickstart_oauth.htm|SkinName=webhelp) , it seems if the user is not actually present to grant access the only option is 'username/password' which requires a security token. As far as I can tell portal users don't have security tokens.

Is there any way to authenticate into our SF instance with the portal user and access the REST API?

  • Hello, Phil, can you explain what you are trying to accomplish via the REST API? From a high level, I don't think what you're trying to do is possible, because your scheduled job is going to run in the context of the admin who scheduled it. By design, REST API's will not allow your scheduled job to "impersonate" another user.
    – Marty C.
    Nov 16, 2014 at 3:52
  • @MartyC. this is a rather old question, I ended up using a standard user license. I was trying to connect one REST endpoint to another in a different org during using a scheduled class using defined credentials. It works fine with a standard user, but the portal user doesn't have a security token to use during authentication.
    – Phil B
    Nov 17, 2014 at 20:13

1 Answer 1


The portal licence type will decide what you can access and what you cannot.

portal license type will not allow you to access standard objects like other contacts and Accounts.So even if you register as a portal user you will be able to use only those Rest based servives that portal user are allowed to usr

  • how do i authenticate with the REST API with a portal user? the portal user doesn't have a security token?
    – Phil B
    Aug 14, 2013 at 18:42
  • can you try with session id first just to confirm portal user can access rest api. Aug 14, 2013 at 18:59
  • security token i believe is needed if you follow autonoumous client oauth model.you can use normal web oauth model Aug 14, 2013 at 19:01
  • Hm, how can i use normal oauth mode? the REST API will be accessed by a scheduled class not by an active user.
    – Phil B
    Aug 14, 2013 at 19:08
  • If its normal user then its simpler.set header in request as Authorization oauth sessionid.Use userinfo to get sessiion id Aug 14, 2013 at 19:26

You must log in to answer this question.

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