I need to do a login of our customer portal users in a mobile app (not using mobile SDK), for authenticating internal users it's working the REST API but for the Customer Portal Users is not.

The body:

username="Username"&client_secret="Secret From Connected App"&password="Password"&grant_type=password&client_id="Client ID from Connected App"

What I need to do to make this work? Is there any guide?

1 Answer 1


I worked through a similar situation. I'm assuming that you are using OAuth, and in a nutshell it boils down the login URL. Internal Users are naturally going to login.salesforce.com, but your portal User are going to have to go to the Site Login URL. Here's the link to the article from that got me going, and here's the excerpt that's at the heart of it.

The first step in enabling OAuth for your Portal users is to associate a Force.com Site with your Portal, if you have not already done so. The Site provides your Portal with a unique URL and allows you to create a custom login page. Apps that wish to login users for the Portal must use the hostname from the Site’s secure URL when redirecting users to the OAuth 2.0 authorization service. For example, rather than redirecting to


instead use


  • I was looking for a way to mention @metadaddy in my answer... he wrote the article (thanks Pat!) and deserved the credit, but couldn't figure out how to! Apr 20, 2017 at 19:47
  • Hello @John, thank you, I found the same article after a deep research, in our case, we don't use the Portal, so we can make the login with the SOAP using just the orgId. Apr 20, 2017 at 20:58

You must log in to answer this question.

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