> For the complete documentation index, see [llms.txt](https://docs.trustlogix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlogix.io/integrations/single-sign-on/azure-active-directory-ms-entra/user-deprovisioning-from-azure-ad.md).

# User Deprovisioning from Azure AD

### Enable User Deprovisioning

To enable automatic user deprovisioning from Azure AD to TrustLogix, follow these steps:

#### Step 1: Enable Auto Deprovisioning in TrustLogix

1. Navigate to existing Azure AD SSO Integration item.&#x20;
2. Click the **Enable Auto Deprovisioning** button in TrustLogix.
3. There are three fields that you need to populate in the TrustLogix UI
   1. Azure Tenant ID
   2. Client ID
   3. Client Secret Value
4. To retrieve these values, go to Azure and search for "App registrations" and then search for the SSO application that has been created under the "All applications"
5. Click on the SSO application and on the main page you will find the following values
   1. Directory (tenant) ID
   2. Application (client) ID&#x20;
6. You will have to generate a new client secret by going to the "Certifications & secrets" option under "Manage" option&#x20;
   1. Click on <img src="https://815455107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0SWnT1NcjBiPxnUvPcqE%2Fuploads%2FqYyCXeEbdBEgCftmYptw%2Fimage.png?alt=media&amp;token=b93a36bb-bf48-4200-997b-1cb009fcb31c" alt="" data-size="line">to generate a new client secret.
7. Now populate the values in the TrustLogix UI with the tenant ID, client ID and client secret Azure values and save them.
8. For the User Deprovisioning to happen in TrustLogix, the SSO application should be provided with the Microsoft Graph service Read API permissions.
   1. Go to "API permissions" option under "Manage" option.
   2. Click on <img src="https://815455107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0SWnT1NcjBiPxnUvPcqE%2Fuploads%2F64Z90zii4yuHBR1SFL8X%2Fimage.png?alt=media&amp;token=7633d138-0cc0-4ed7-9961-06429fae64d1" alt="" data-size="line"> button and select "Microsoft Graph" service.
   3. Then click on the "Application permissions" button and search for "DelegatedPermissionGrant" as well as "User" permissions to select the Read permission e.g.  <img src="https://815455107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0SWnT1NcjBiPxnUvPcqE%2Fuploads%2FKWaFegQc8PQgPqATNpPC%2Fimage.png?alt=media&amp;token=d68f5ff8-656b-4120-9803-95d2e10bebb2" alt="" data-size="line"> and click on the "Add permissions" button.
   4. Click on "Grant admin consent for Default Directory" button to provide the above Read permissions <img src="https://815455107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0SWnT1NcjBiPxnUvPcqE%2Fuploads%2FRaQk3LVQe4TrZU6JrMUl%2Fimage.png?alt=media&amp;token=ccf76ec7-b6ad-4479-936a-c2a947b617e1" alt="" data-size="line">

***

### Notes

* If **Auto User Deprovisioning is disabled**, customers must manually remove users in the TrustLogix application.
* If **Auto User Deprovisioning is enabled**, users removed in Azure AD will be automatically be removed from the TrustLogix application.

By following these steps, TrustLogix will be successfully integrated with Azure AD for automatic user deprovisioning.


---

# 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.trustlogix.io/integrations/single-sign-on/azure-active-directory-ms-entra/user-deprovisioning-from-azure-ad.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.
