# Elastic Security Rule Keyword issue

**URL:** <https://discuss.elastic.co/t/elastic-security-rule-keyword-issue/349782>\
**Category:** Elastic Security\
**Tags:** detection-rules\
**Created:** [December 21, 2023, 9:42am UTC](https://discuss.elastic.co/t/elastic-security-rule-keyword-issue/349782 "2023-12-21T09:42:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DVD\_MNC](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@DVD\_MNC](https://discuss.elastic.co/u/DVD_MNC)\
**Post date:** [December 21, 2023, 9:42am UTC](https://discuss.elastic.co/t/elastic-security-rule-keyword-issue/349782/1 "2023-12-21T09:42:42Z")

</div>

Hello everyone,  
I have a strange problem with elastic rules.

As you can see from the rule, I'm trying to trigger an alert every time a user misses a login twice (it's just a test).

The preview of the rule works only if the id is specified as text and not as .keyword (but if you see the image I can't save the rule anyway if I don't specify the keyword, the label is red),

 ![funge](https://us1.discourse-cdn.com/elastic/original/3X/0/9/09991f1342d06f05331d01501ed4f3a49ee8b7e8.png)

if keyword goes wrong.

 ![errore](https://us1.discourse-cdn.com/elastic/original/3X/6/5/65b6cc3d2a4e03f6e049b9581b87f4aab4fd6eea.png)

But in my index, as you can see from the data view, the .keyword field is populated correctly.

 ![table](https://us1.discourse-cdn.com/elastic/original/3X/2/1/217df577cef669a7ea4771252d644b019d3dbd2d.png)

Can you please help me out? Thank you very much.

Happy Christmas days to all.

---

<div class="post-metadata">

**Author:** ![DVD\_MNC](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@DVD\_MNC](https://discuss.elastic.co/u/DVD_MNC)\
**Post date:** [January 3, 2024, 2:13pm UTC](https://discuss.elastic.co/t/elastic-security-rule-keyword-issue/349782/2 "2024-01-03T14:13:56Z")

</div>

Any updates? Please

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 31, 2024, 2:14pm UTC](https://discuss.elastic.co/t/elastic-security-rule-keyword-issue/349782/3 "2024-01-31T14:14:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
