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
Support Team 22Support Team 22 

How to prevent a user to perform a login

Hi,

I want to create a user with admin permissions but with no option of logging in the environment.
The purpose of this task is to give our partner an external access to Salesforce by API (so he could open cases for example) without exposing him to our data.

Or maybe there is another, better way?

Thanks in advance.
 
SandhyaSandhya (Salesforce Developers) 
Hi,

You can create a Secure Salesforce API User.Refer below help article.

https://help.salesforce.com/articleView?id=000176281&type=1
 
https://success.salesforce.com/answers?id=9063A000000iYZ1QAM
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
Support Team 22Support Team 22
Hi Sandhya, thanks for the quick answer.

In the meantime, I built a workaround: 
I set the login hours to 12:00 AM - 12:00 AM (= zero login hours).
It seems to solve it. 

Is that a good approach?

 
Support Team 22Support Team 22
Hi Sandhya, thanks for the quick response.

In the meantime, I have created a workaround:
I have limited the login hours to 12:00 AM - 12:00 AM (= zero login hours), so the user can never log in.

Is that a good approach?

Thanks in advance.