function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Remco SellmeijerRemco Sellmeijer 

Restrict connected app to single Organisation?

Hi,

I'm building a hybrid mobile app using the Salesforce SDK. I created a connected app in my Salesforce org and pasted the consumer key in the bootconfig.json file. I followed the following steps to give certain users permission to access the connected app.
Set Permitted Users option to: "Admin approved users are pre-authorized"
Created a permissionset and assigned it to the connected app.
When the user has the permissionset assigned he is allowed to login, else he is not. This works perfectly fine for the users from the Organisation where I created the Connected App in. 

But, if I use login credentials of a Salesforce user from different Organisation, authentication will succeed without the user having the correct permissionset assigned. As in the other organisation, the permissionset has not been created. 

Is there any way to restrict access to the connected app when the user logs in with credentials from a different Salesforce org, so it is only possible to login with user accounts from the org where I created the connected app in? 

Thanks in advance.

Kind regards,
Remco