Im building a multi tenant application where each client has their own subdomain. For example: clientA.myapp.com and clientB.myapp.com

I want to allow clients to integrate our app with their Salesforce installation. I have a developer account which I'm using to learn Salesforce and test everything out, and to integrate with our app I had to create a connected app, which gave me a client_id after it was created. In the connected app, I also had to define a redirected_uri which needs to be the same I use when calling the OAuth endpoint (https://login.salesforce.com/services/oauth2/authorize)

My question is: do clientA and clientB need to create a connected app inside their salesforce installation, and use clientA.myapp.com/salesforce/callback or something in their respective redirect_uri? In other words, can I avoid having to ask my clients for this extra step?


Sometimes we have the same client using two different accounts in our app. For example, clientA-app1.myapp.com and clientA-app2.myapp.com - Internally, for us they are treated as completely different accounts. But if this client only had one Salesforce installation and created one connected app, if app1 authenticates and receives an authorisation code, and then app2 does the same, will the authorisation code granted to app1 be revoked? How could I avoid this scenario? Would the client need to create 2 connected apps inside their Salesforce installation?


I've been researching how other web apps integrate with Salesforce, and particularly looked at Zapier.

They never asked me to create a connected app and provide the ID. The only asked me to click a button that redirected me to Salesforce, I logged in, and gave Zapier permission to access my stuff. So it would seem like Zapier has their own salesforce installation where they created their connected app, and I just gave this connected app permission to access my stuff.

How can I do something like this? All I have in salesforce is a developer account. Am I supposed to create the connected app in there, and use that to connect with our clients installations?

  • If someone runs into this, this other answer was exactly what I needed to understand: salesforce.stackexchange.com/questions/70489/…
    – Alex
    Mar 22, 2017 at 23:23
  • Did you ever figure out exactly how this worked? I'm trying to do the exact same (Like Zapier style) where you don't need to make any modifications like creating a web service.
    – Moo Master
    Jun 23, 2017 at 1:17


You must log in to answer this question.

Browse other questions tagged .