This is very common requirement for any website/portal to lock and unlock user's account if they fails to login in 'N' numbers of attempt. This tutorial will walk you through the steps of configuring to lock users out if they fail to login too many times, and show you how to make them unlock back to access the Portal again.
How to Lock User's Account in CRM Portal:
Below are the few Portal Site Settings that define how and when an account becomes locked from authentication. When a certain number of failed password attempts are detected under a short period of time, the user account is locked for a period of time. The use can try again after the lockout period elapses.
Site Settings :
1. Authentication/UserManager/UserLockoutEnabledByDefault
Description : Indicates whether the user lockout is enabled when users are created. Default: true
2. Authentication/UserManager/DefaultAccountLockoutTimeSpan
Description : The default amount of time that a user is locked out for after Authentication/UserManager/MaxFailedAccessAttemptsBeforeLockout is reached. Default: 00:05:00 (5 mins).
3. Authentication/UserManager/MaxFailedAccessAttemptsBeforeLockout
Description : The maximum number of access attempts allowed before a user is locked out (if lockout is enabled). Default: 5.
When the Lockout Enabled field on Contact is checked, it means that failed sign-in attempts will be counted in Access Failed Count to determine if a temporary user lockout should be activated. Once lockout is activated, the contact is unable to sign-in until the Lockout End Date has passed. If the Lockout Enabled field is unchecked, failed sign-in attempts are not recorded and the contact is allowed to fail any number of times without activating a lockout.
Once a user has been locked out due to too many failed login attempts, the account gets locked. At this point, the user can no longer use the reset password feature because when he clicks on it and types his username, it says the username is invalid. How come the reset password feature doesn't work when an account has been locked out?
So if your account get locked in CRM Portal, It's 'Lockout End Date' starts get appearing in above screenshots. Your won't be able to access your account until the Lockout End Date has passed.
But if you want to build up the functionality in Portal to make your account unlock before Lockout End Date has passed, You can make request to your Portal Administrator or anyone who have Admin rights on CRM. If someone will make this field blank or change the Lockout End Date to any past date, then User can start accessing his/her account.
If you do not want to perform this activity manually, you can create an 'On-Demand Workflow'in CRM, this workflow will just update Contact record by making the 'Lockout End Date' field blank..
You can make this functionality available on Portal also, Anyone who is having Portal Administrative privilege will login on portal. You can expose an 'Entity List' for Admin User only which will show list of all Contacts whose Account got locked by putting condition in Entity List View:
'Contact whose 'Lockout End Date' contains data.
Administrator will select Contact and Run On Demand Workflow, this will trigger workflow in CRM and unlock the contact.
If you are not aware how to Run On Demand Workflow From Portal Entity List. Have a look Adxstudio Community this link.