> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/microsoft-365/onedrive/policies/detection_rules.md).

# Configure Detection Rules for OneDrive

Learn how to configure the detection rules section in Nightfall policies created for Microsoft OneDrive.

In this section, you can select the Detection rules for the policy and If not already created, you can create detection rules. To learn more about how to configure detection rules, see [Configuring Detection Rules](https://help.nightfall.ai/nightfall-ai/nightfall-for-slack/installation-instructions-nightfall-for-slack-1/configuring-detection-rules).

You can use the search bar to search for a detection rule by its name.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FHI3TlS6HPOBTpHdVANqz%2Fimage.png?alt=media&amp;token=249a0b68-dc30-470e-a552-b45de08b1d78" alt=""><figcaption></figcaption></figure>

Once the required detection rules are displayed, you can select the required detection rules by ticking the respective check box. When you select any detection rule, you can view three options.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fp3VP6ZHSG8nwEoHKzo1Q%2Fimage.png?alt=media&amp;token=08531718-19f3-435b-9e89-835298e85582" alt=""><figcaption></figcaption></figure>

These three options are related to the display of detection rules.&#x20;

* **All Detection Rules**: This option displays all the available detection rules, irrespective of the detection rule(s) selected.
* **Selected Detection Rules**: This option displays only those detection rules that you have selected.
* **Unselected Detection Rules**: This option displays only those detection rules that you have not selected.

Select the check box(es) of all the detection rules you wish to include in the policy. The policy evaluates only those detection rules that you have selected here. Once you select all the required detection rules, click **Next** to move to the next stage.&#x20;


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/microsoft-365/onedrive/policies/detection_rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
