I have multi-tenant SaaS application with single URL address. On application's login screen there is beside username and password fields one more - tenant name.

I would like to add on login screen - Sign On With SalesForce button. There it will be called standard OAuth 2.0 protocol. Problem that I found is, how I will provide tenant name that will be used after authentication ? I know that I can send state within OAuth but I do not know tenant name in the moment when OAuth is initialized ? How to accomplish this ?

Someone has faced with this issue before ?

1 Answer 1


OAuth is meant for authorizing on the Salesforce platform and giving other applications the right to do things in name of the authorizing user. To do this, you don't need the Tenant Name.

But if you want the Tenant Name in your application, then e.g. do an API call to Salesforce (using the OAuth token) to get the users details, and get the Name from there and use that as the Tenant Name?

  • Great hint Willem. I just need to set up that field as invisible for SF user. Only admin has to be in position to edit it.
    – Rastko
    Sep 21, 2015 at 13:42

You must log in to answer this question.

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