> 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/workflows/define-workflow-settings/action-settings/remediate/entra-id-remediation.md).

# Entra ID remediation

DoControl integrates with Microsoft Entra ID (previously Azure AD) to extend the principle of least privilege beyond the identity layer. DoControl collects information about your Microsoft Entra ID group hierarchy and OAuth applications that have domain-wide delegation, and then registers to receive webhook events of user activity.&#x20;

Implement secure workflows based on individuals, groups, or domains to mitigate the risk of data overexposure and exfiltration. For example, you can add a remediation action to workflows to remove an OAuth app from Microsoft Entra ID.

You can implement these remediation actions in automated workflows across Microsoft Entra ID assets:

## Remove OAuth app

You can implement a remediation action in automated workflows to delete a specific OAuth app that poses a security risk to your organization. Relevant use cases for removing OAuth apps include when an actor:

* Adds a Microsoft Entra ID app via Office365 marketplace.
* Grants excessive (write) permissions to a Microsoft Entra ID app.

{% hint style="warning" %}
DoControl deletes OAuth apps in near-real time.
{% endhint %}

#### To delete an OAuth app:

1. In your workflow, define a trigger related to Microsoft Entra ID such as adding an application.
2. Add any relevant conditions, such as if the raw data contains `microsoft.com` or `Office365.`
3. Add any relevant **Approve** action to elicit approval from the relevant team.
4. From the Actions pane, select **Remediate > Microsoft Entra ID > Remove OAuth app**.
5. Use the automatically-populated `App ID` field or add a macro.

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FZgFn4Yw2MUOukRimdKZj%2FAzure%20AD%20delete%20OAuth.png?alt=media&amp;token=0d7858b8-c28f-4761-89d4-c6a4c14119a2" alt=""><figcaption><p>Defining a workflow with a remediation action to automatically remove an OAuth app</p></figcaption></figure>


---

# 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/workflows/define-workflow-settings/action-settings/remediate/entra-id-remediation.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.
