We are having a rails app and the authentication is based on Salesforce OAuth. Salesforce OAuth is used as our app requires salesforce objects.

When we create a connected app in salesforce and use it for OAuth, then typically all salesforce users can use our app. But we want to restrict to certain users.

I came across this Stackoverflow entry which is exactly the same.

Apart from the answer provided in that Question, do we need to do any additional logic in our rails app to restrict or just setting the OAuth policies to "Admin approved users are pre-authorized" should do fine?

And how a admin user can authorize a user to use this connected app in salesforce?

1 Answer 1


I'm going to refer you to two documents that I believe will answer your questions. The first is Salesforce Help page Connected Apps Overview and the pages that follow it, which will walk you through in detail, all of the set-up in Salesforce that's required for a Connected app.

The 2nd is from the Integration Workbook. I recommend you look at Tutorial #3: Update the Heroku App the first part of which, gives instructions for configuring the Heroku end of a REST web service to connect with Salesforce through OAuth. The earlier parts of the Workbook were for Salesforce to connect with Heroku to receive data and not vice versa. I think that should provide you with any insight you might need should that be the situation that applies to you.

You must log in to answer this question.

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