Microsoft 365, AD and Windows · #33

Online userAccountControl Decoder

Splits a userAccountControl number into flags and reads disabled, locked and expired state from the right source.

  • Data is processed in your browser and not sent to a server

Tool

Decimal (514) or hex (0x202).

Lockout and password expiry live in this computed attribute.

FILETIME; 0 and 9223372036854775807 mean 'never'.

What does this tool do?

userAccountControl is a sum of flags: 514 = NORMAL_ACCOUNT (512) + ACCOUNTDISABLE (2). A common mistake is reading lockout from the LOCKOUT bit in this value; modern AD does not update that bit. Lockout and password expiry must be read from the computed attribute msDS-User-Account-Control-Computed.

How to use it

  1. Enter userAccountControl in decimal or hex with 0x.
  2. For lockout add the Get-ADUser -Properties msDS-User-Account-Control-Computed value, and accountExpires for expiry.

Fields

userAccountControl
Decimal (514) or hex (0x202).
msDS-User-Account-Control-Computed (optional)
Lockout and password expiry live in this computed attribute.
accountExpires (optional)
FILETIME; 0 and 9223372036854775807 mean 'never'.

Worked example

InputValue
userAccountControl514
msDS-User-Account-Control-Computed (optional)16
accountExpires (optional)9223372036854775807

Expected result: 514 = NORMAL_ACCOUNT + ACCOUNTDISABLE; computed 16 → account locked; accountExpires never.

The account appears both disabled and locked. Enabling a disabled account does not unlock it; they are separate operations (Enable-ADAccount and Unlock-ADAccount).

Second scenario

InputValue
userAccountControl4260352
msDS-User-Account-Control-Computed (optional)0

Expected result: 4260352 = NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORD + DONT_REQ_PREAUTH: Kerberos pre-authentication disabled (AS-REP roasting risk).

Method and assumptions

The value is tested against bit masks (Microsoft's userAccountControl flag list). Unknown bits are shown separately.

Lockout (0x10) and PASSWORD_EXPIRED (0x800000) are evaluated only from the computed attribute. accountExpires is a 100 ns FILETIME converted from the 1601-01-01 epoch to UTC with BigInt.

Security-relevant flags (PASSWD_NOTREQD, DONT_REQ_PREAUTH, TRUSTED_FOR_DELEGATION, USE_DES_KEY_ONLY, ENCRYPTED_TEXT_PWD_ALLOWED) get an extra warning.

Using the result and troubleshooting

To find accounts with a risky flag in bulk: Get-ADUser -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=4194304)' (DONT_REQ_PREAUTH example).

Limits and common mistakes

  • It does not connect to the directory; you enter the values.
  • It does not calculate when the password expires (needs pwdLastSet and domain policy); the AD Timestamp Converter converts pwdLastSet.

Frequently asked questions

Why is the LOCKOUT flag in UAC unreliable?

Since Windows 2003 lockout is tracked by lockoutTime and the computed attribute; bit 0x10 in userAccountControl is not updated and is misleading.

Related tools and service

Related service: Active Directory Security Audit

Systems online tools · See all online tools