> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/saas-data-monitoring/events/docontrol-events.md).

# DoControl events

DoControl generates its own events that you can leverage in workflows:

* [Identity risk score changed](#identity-risk-score-changed)
* [Security check status changed](#security-check-status-changed)

## Identity risk score changed

It can be difficult to understand how, when, and why a user's risk score changed. DoControl gives you full visibility into risk score changes, and notifies you immediately whenever a user's risk score changes.

The `Identity risk score changed` event is triggered whenever a user's risk score increases or decreases, even by 1 point. The event is enriched with data, and includes breakdowns of old and new risk scores, allowing you to better understand the reasons for risk spikes.

This event type can be leveraged in 2 ways:

* [Investigate risk changes](#investigate-risk-changes) - From the Events page, you can investigate changes in a user's risk score. See the full context for the risk change in a JSON file and leverage it in investigations.
* [Create workflows triggered by identity risk score change ](#create-workflows-triggered-by-identity-risk-score-change)- You can define workflows to track risk changes, and automatically notify your security team whenever a user's risk score changes significantly.

### Investigate risk changes

DoControl generates an event every time a user's risk score changes, even by 1 point. From the JSON files in the Events page, you can investigate the reasons for changes in a user's risk score:

1. In DoControl, go to **Events**.

2. Under **Filters**, select `Event type includes Identity risk score changed`.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F1tOru9HjaqohXah2SOXN%2Fevent%20types.png?alt=media&amp;token=b062ae70-7514-4804-ba66-2c8aaf4a1bf2" alt=""><figcaption></figcaption></figure>

3. For each internal user where the risk score changed, you can compare the old score to the new score. For example:\
   `Old score: 48, New score: 99`

4. Click the **JSON** link to see the full data context for risk change and leverage it in your investigations.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FjxkwQSYQQsefIwArS7ik%2Fidentity%20risk%20events.png?alt=media&amp;token=17c9b58b-753f-4cb3-8327-0412020d9be6" alt=""><figcaption><p>Investigate the JSON file for any <strong>Identity risk score changed</strong> event</p></figcaption></figure>

5. Click the **actor** name to open the Identities risk card for that user.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FNfzg8Sc8pd9fdyBHb6OS%2Frisk%20tab.png?alt=media&amp;token=3bb6093c-c950-4724-912e-b5bb831f9469" alt="" width="563"><figcaption></figcaption></figure></div>

#### Data-rich event context

From the Events page, you can investigate changes in a user's risk score. Each **Identity risk score changed** event is displayed with its full context in a [JSON file](#json-example), and includes these parameters:

<table><thead><tr><th width="218">Identity context</th><th>Parameters</th></tr></thead><tbody><tr><td>User identity</td><td><ul><li>Identity name</li><li>Identity’s department  </li><li>Job title</li><li>SaaS app roles</li><li>Employment status</li><li>Employment type</li><li>Emails (personal and work)</li></ul></td></tr><tr><td>Old risk</td><td><ul><li>User's previous risk score with breakdown of risk elements </li><li>Department or organization’s previous risk score with breakdown of risk elements</li></ul></td></tr><tr><td>New risk</td><td><ul><li>User's current risk score with breakdown of risk elements</li><li>Department or organization’s current risk score with breakdown of risk elements</li></ul></td></tr></tbody></table>

#### **JSON example**&#x20;

The JSON file for the **Identity risk score changed** event is enriched with data:

```
{
  "identity_info": {
  	"name": "Guy Rosenthal",
   	"department": "Product",
    	"job_title": "VP Product",
   	"employment_status": "ACTIVE",
  	"employment_type": "FULL_TIME",
“emails” :{
 "work_emails": {
"email1": "gr@docontrol.io",
      			"email2": "gr2@docontrol.io"
}
“personal_emails”:{
“email1”: “gr11@gmail.com”,
“emails2”:”gr88@yahoo.com”, 	
			}
    }
  },
  "old_risk": {
   	 "identity": {
    	 	 "score": "80",
    		  "risk_elements": {
      		 "exposure_level": {
 		     	"total_assets": "500",
  		      	"public": "160",
   		   	"external": "40",
         			"internal": "300"
     			   },
        		"dlp_exposure": "MEDIUM",
       		 "VIP": "NONE",
       		 "admin": [
       		   {
      		      	"saas": "google",
        			 "role": "super_admin"
        		  },
        		  {
        			    "saas": "google",
        			    "role": "admin"
       		   }
   		     ],
     		   "alerts": {
     		     	"active": "5",
     		    	 "archived": "0"
    		    },
     		   "workflows": "20",
     		   "shadow_apps": "4",
      		  "employment_status": "ACTIVE",
       		 "employment_type": "FULL_TIME"
      },
      "department": {
        	"score": "55",
        	"risk_elements": {
          		"exposure_level": {
            		"total_assets": "100",
            		"public": "60",
            		"external": "40",
            		"internal": "0"
         		 },
          		"dlp_exposure": "LOW",
        		"alerts": {
         			"active": "3",
          			"archived": "0"
      		  },
        		"workflows": "4",
        		"shadow_apps": "2"
     		 }
    		}
  		},
  "new_risk": {
    	"identity": {
      		"score": "90",
      		"risk_elements": {
        			"exposure_level": {
          				"total_assets": "500",
          				"public": "160",
          				"external": "40",
          				"internal": "300"
        			},
        			"dlp_exposure": "MEDIUM",
       			 "VIP": "NONE",
        			"admin": [
          				{
            			"saas": "google",
            			"role": "super_admin"
         				 },
          				{
            			"saas": "google",
            			"role": "admin"
         				 }
        				],
        			"alerts": {
          				"active": "5",
          				"archived": "0"
        				},
        			"workflows": "20",
        			"shadow_apps": "4",
        			"employment_status": "ACTIVE",
        			"employment_type": "FULL_TIME"
     		 },
      "department": {
        	"score": "55",
       	 "risk_elements": {
          		"exposure_level": {
            		"total_assets": "100",
            		"public": "60",
            		"external": "40",
            "internal": "0"
          },
         		 "dlp_exposure": "LOW",
         		 "alerts": {
          			"active": "3",
          			"archived": "0"
       			 },
        		"workflows": "4",
        		"shadow_apps": "2"
      }
    }
  }
```

### Create workflows triggered by identity risk score change

You can define a workflow to automatically notify your security team whenever a user's risk score changes significantly, for example, from low (0-29) to high (50-79).

These workflows are triggered by DoControl's **Identity risk score changed** event, and are displayed in the Workflow list under the DoControl app:

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F0MVhNwBln8YaoWPic8vk%2Fevent-based%20WF%20list.png?alt=media&amp;token=84338a77-3c69-43b1-865b-141837ee7673" alt=""><figcaption><p>Workflows triggered by a change in identity risk score</p></figcaption></figure>

{% hint style="success" %}
For pre-populated risk identity management playbooks, see [Monitor risk change](/docontrol-user-guide/risk-management/identities/monitor-risk-change.md).
{% endhint %}

#### To create a workflow to monitor identity risk score changes:

1. In Workflows, select **New workflow.**

2. For the app, select **DoControl**.

3. For the trigger, select **Event > Identity risk score changed.**<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FmDvGSobkiH9JkElE7xIK%2Frisk%20score%20change%20event.png?alt=media&amp;token=47f1c70d-f807-4f24-a0cf-982afa232264" alt=""><figcaption></figcaption></figure>

4. Add a **Conditional** action.

5. Define the condition, for example: If the \<new\.risk> - \<old.risk> is greater than 30.

   * If **true** - Notify the security team via email or Slack.
   * If **false** - End the workflow.

6. Customize the **Notify by email** action:\
   `<Internal user's> risk score increased significantly from <old risk score> to <new risk score> due to <risk element>. Please investigate.`

## Security check status changed

DoControl gives you full visibility into newly detected misconfigurations, and notifies you immediately whenever a security check fails.

The `Security check status changed` event is triggered whenever a security check changes its status. The event is enriched with data, and includes breakdowns of old and new security check results, allowing you to better understand the reasons for a misconfiguration.

This event type can be leveraged in 2 ways:

* [Investigate security check changes ](#investigate-security-check-changes)- From the Events page, you can investigate changes in a security check scan result. See the full context for the status change in a JSON file and leverage it in investigations.
* [Create workflows triggered by security check status change](#create-workflows-triggered-by-security-check-status-change) - You can define workflows to track changes in security scan checks, and automatically notify your security team whenever a security check fails.

### Investigate security check changes

DoControl generates an event every time the status of a security check changes. From the JSON files in the Events page, you can investigate the reasons for changes in a security check:

1. In DoControl, go to **Events**.
2. Under **Filters**, select Event type includes **Security check status changed**.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F4NmeUwBqkmPUlsURjGOF%2Fevents%20security%20risk%20change.png?alt=media&amp;token=18bb220a-ee2b-4e48-b9aa-e4add3a67700" alt=""><figcaption></figcaption></figure>
3. For each security check whose status was changed, for example, from Pass to Fail, you can view any workflows or alerts that were triggered as a result. <br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FcH1DIGD5ogxgOyKvPmwz%2Fevents%20with%20security%20checks.png?alt=media&amp;token=c4ce34e6-f7b0-4e07-b202-128353f742e3" alt=""><figcaption></figcaption></figure>
4. Click the **JSON** link to see the full data context for security check status change, by comparing the previous evaluation with the new evaluation, and leveraging it in your investigations.

### Create workflows triggered by security check status change

You can define a workflow to automatically notify your security team by email or Slack whenever the status of a security check changes, for example, from Pass to Fail. You can leverage workflows to manage misconfigurations automatically:

* Configure your workflow to open a Jira ticket to handle the misconfiguration
* Add a remediation workflow to resolve the misconfiguration
* Forward detected misconfiguration data to your SIEM or any other system using DoControl workflows

These workflows are triggered by DoControl's **Security check status changed** event, and are displayed in the Workflow list under the DoControl app:

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fa3hvGp2Gr2ijtvm1LMCc%2Fworkflow%20list%20security%20change.png?alt=media&amp;token=a92ad44b-776d-4f1c-b181-c70928600889" alt=""><figcaption><p>Workflows triggered by a change in security check status</p></figcaption></figure>

**To create a workflow to monitor security check status changes:**

1. In Workflows, select **New workflow.**
2. For the app, select **DoControl**.
3. For the trigger, select **Event > Security check status changed.**<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FHfkAYbOtVMfFLjJjaXhq%2FEvent%20-%20security%20check%20status%20change.png?alt=media&amp;token=1d01e911-de7f-49a1-8f3b-4d845c423836" alt=""><figcaption></figcaption></figure></div>
4. Add a **Conditional** action.
5. Define the condition, for example: If the \<new\.evaluation.status> equals \<Fail>:&#x20;

   * If **true** - Notify the security team via email or Slack.
   * If **false** - End the workflow.

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FDmOT21ie84Am5IRFa00F%2FWF%20status%20change%20fail.png?alt=media&amp;token=3a2a6c07-fe24-479e-98e2-52c38b9a4bb1" alt=""><figcaption></figcaption></figure>
6. Customize the **Notify by email or Notify in Slack** action, or open a Jira ticket:\
   `The security check: <Name> recently failed. Please investigate.`


---

# 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://docs.docontrol.io/docontrol-user-guide/saas-data-monitoring/events/docontrol-events.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.
