1
votes

Is it possible to use the salesforce APIs in a JS application to authenticate users of multiple, unknown organizations that I do not control or have access to and import their account names? I want users of my application, all of which belong to different companies, to be able to import their salesforce contacts into my application. All of the tutorials I have come across seem to focus on creating applications for organizations that the developer has access to via "connected apps". I assume that creating a connected app will only allow access to that specific organization and that if someone from a different organization tried to authenticate and access their data it would fail? Pointers to the product I should be using to accomplish this are much appreciated!

1

1 Answers

1
votes

You have the right idea, to get data from a salesforce org, you are going to need the user with the Salesforce account to authorize your application to access the data. The connected app is basically just a way for you to get the auth code that you need to access that data.

It is possible to define the connected app in one org, and have it be used by multiple different salesforce orgs. The data that one auth code provides access to is limited based on the data available to the user that grants access.