Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Exchange 2010 - OWA - Lock user after x amount of failed logins

Published: 19-12-2012 | Author: Remy van Elst | Text only version of this article

Table of Contents

This is a tutorial to set up automatic user lockout in Exchange 2010 - OutlookWeb Acces (OWA). When a user does 5 wrong login attempts, he/she is locked outfrom the webinterface. After for example 5 minutes he or she is unlocked againautomatically. This helps you mitigate brute force attacks, since an attackercan only try 1 password/minute, but the user will not be blocked for to long.Exchange 2010 has some special register settings to make IIS stop caching,otherwise it would not work.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Group Policy settings

Execute the following steps on one of your domain controllers.

Start -> Administrative Tools -> Group Policy Editor.

Right click the "Default Domain Policy" (or any other policy where you mightwant to apply this).

Click Edit

Navigate to: Computer Configuration -> Policies -> Windows Settings ->Security Settings -> Account Policies -> Account Lockout Policy.

Set the following values: - "Account Lockout Duration": 5 minutes - "AccountLockout Threshold": 5 invalid logon attempts - "Reset Account Lockout CounterAfter": 5 minutes

Adapt this to your own time/threshold if you feel so.

Also make sure the group policy is enforced.

Lets move on to IIS to make sure that OWA does not cache the login token.


Outlook Web Access operates via the IIS server, which when using form basedauthentication caches login tokens for a set amount of time. (See thislink) and this one.

If you have set the above group policy and you test in on the outlook web accessof the exchange server, you will notice that if you have done more than 5 failedlogins you can still login with the good password.

On your IIS server(s) where OWA resides execute the following:

Click Start

Click Run

Type: regedit

Navigate to the following key:


Click the Edit menu, then the Add menu, select a 32 bit DWORD (or justDWORD).

Name it: UserTokenTTL

Then set its value to 30. This means that user tokens will be cached for 30seconds by IIS.

Now that is also solved.

Bonus: Active Directory Saved Search to view Locked Out users

Open the Active Directory Users && Computers window from the AdministrativeTools menu.

Right Click the Saved Queries, select New -> Query.

Name: Locked Out users Description: -

Click Define Query. Click the Find dropdown, select Custom Search. Selectthe Advanced tab.

Paste the following LDAP Query:


Click OK.

Click OK.

Now if a users calls you that they cannot login, you can see if they are lockedout via that Saved Search. (Note that you might have to refresh the view a fewtimes before seeing it.)

Tags: exchange, microsoft, outlook, outlook-web-access, owa, server-2008, tutorials, windows