Salesforce Fact #948 | Prevent login using Transaction Security Policy
We can use transaction security policy to prevent multiple users from logging into Salesforce.
To implement this, we use the LoginEvent, an apex class and custom permission set.
In this example, we have created a permission set 'Prevent Login PS' and in the apex class we are checking whether the user is assigned the PS or not.
Note: Custom permission check does not work because in that case the context user is Automated user, not the intended user.
Attached are the screenshots.
Comments
Post a Comment