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
Ramesh Rage 16Ramesh Rage 16 

Is there way to stop concurrent logins in salesforce, for specific profile users or specific users?

Hi All,

I have requiremnet from one of our client to stop or force the user to logout from multiple system when they try to login to multiple systems.

Please let me know if this can be done using  salesforce OOTB features or any custom solution using code.

Regards,
Ramesh
Khan AnasKhan Anas (Salesforce Developers) 
Hi Ramesh,

Greetings to you!

You can use Login Flows to restrict the number of simultaneous Salesforce sessions per user.

Please refer to the below links which might help you further with the above requirement.

https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_login_flow_limit_concurrent_sessions.htm

https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/admin_loginrestrict.htm

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Raj VakatiRaj Vakati
You no need to use flow for concurrent session and it an easy way is going using apex transaction security 

http://www.salesforcehacker.com/2015/10/cause-and-consequence-need-of-real-time.html
https://help.salesforce.com/articleView?id=security_transactions_apex_policies.htm&type=5
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_apex_implementation_examples.htm
DeemoDeemo

@Khan Anas

Hi,

I've created the APEX Class and started creating the flow following the 'Limit the Number of Concurrent Sessions with Login Flows' guide (from your link) but im stuck on (4).

It says: From the toolbox, open the Elements tab. Drag a Apex Action (Legacy) element onto the canvas, and select the SessionPlugin legacy Apex action. Store the action’s CONCURRENT_NO parameter in the 'session_no' flow variable.

Problem is, ive created the 'session_no' variable but on the Apex Action Legacy element, when i try to store the action’s CONCURRENT_NO parameter in the 'session_no' flow variable - it doesnt find it in the search under 'Set Output Values' tab. Even when i create the variable from new from the search, it doesn't add. Do you know why this could be?