> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/password-protection/v1.0/configuration/configuring-a-length-based-complexity-policy.md).

# Configuring a length based complexity policy

The password filter policy allows you to assign different complexity requirements to passwords based on their length. This allows you to 'reward' length over choice of character sets.

For example you can require 3 out of 4 character sets for passwords under 13 characters in length, but anything over that has no special requirements.

The `Enable length-based complexity rules` policy allows you to define three separate thresholds each with their own requirements.

Each threshold contains 3 settings

* Length - Specify the length of password that the settings apply to.
* Require a number of character sets to be present. Of the character set types available (lower case letter, upper case letter, number and symbol). Specify how many must be present in the password. Setting this to `3` is equivalent to Active Directory's built-in password complexity policy settings.
* Require specific character sets to be present. Use this option to enforce that all the specific character sets you selected are present in the password before approving it.

If you only require two levels of threshold, leave threshold 3 empty. If you only require a single threshold, leave thresholds 2 and 3 empty.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lithnet.io/password-protection/v1.0/configuration/configuring-a-length-based-complexity-policy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
