> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/sharepoint/delete-users-sites-permissions.md).

# Delete Users Sites Permissions

Looks up the permissions on a SharePoint site and removes every one that is granted to the email address of each matched user. It works on the site, not on a list.

### Before you begin

* A Microsoft Entra (Azure AD) app registration: its tenant ID, client ID and client secret. The job signs in with the client credentials flow against Microsoft Graph.
* A SharePoint site and list reachable through that app.
* Connection values can be saved once as defaults. See [Action Center Settings](broken://pages/cc784ab7cf7754a10fa01950ebaf27cc37a8a8df), group **SharePoint**, one tab per job.
* Accepted asset types: user.
* Required columns: **Email**. Users without an email value are ignored.
* The **List Name** field is part of the shared SharePoint form and must be filled in, although this job does not use the list.

{% hint style="warning" %}
This job deletes permission entries on the site. Check the workflow query and the matched users before activating it.
{% endhint %}

### Settings

| Setting           | Type             | Required | Default    | Description                                                                                            |
| ----------------- | ---------------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------ |
| Tenant ID         | Text             | Yes      | None       | Microsoft Entra (Azure AD) tenant ID.                                                                  |
| Client ID         | Text             | Yes      | None       | Application (client) ID from Azure.                                                                    |
| Client Secret     | Text (sensitive) | Yes      | None       | Client secret value from Azure. Masked after saving.                                                   |
| SharePoint Domain | Text             | Yes      | None       | Your SharePoint domain, for example `example-my.sharepoint.com`.                                       |
| Folder Type       | Text             | No       | `personal` | Folder type in SharePoint, for example `personal` or `marketing`.                                      |
| Site Address      | Text             | Yes      | None       | Site address path, for example `jdoe_example_com`.                                                     |
| List Name         | Text             | Yes      | None       | Name of the SharePoint list.                                                                           |
| Timeout           | Integer          | No       | 30         | Request timeout in seconds. This field has no label in the serializer, so the console name may differ. |
| User Email Field  | Text             | No       | `Email`    | Asset field containing the user email for the permission lookup.                                       |

### How it works

The job requests a Microsoft Graph token and resolves the site from **SharePoint Domain**, **Folder Type** and **Site Address**.

For each user it reads the **User Email Field**; users without a value are skipped and counted as failed. It lists the site permissions and collects those granted to an identity with the same email (case-insensitive).

Each collected permission is deleted with its own request. A user counts as processed when at least one permission was deleted. Users with no matching permission are logged as having no permissions. Failures are logged and do not stop the job.

At the end the job logs processed, no permissions, failed and total counts. It reports success when at least one user was processed.

### Example

```
Tenant ID:          00000000-0000-0000-0000-000000000000
Client ID:          YOUR_CLIENT_ID
Client Secret:      YOUR_CLIENT_SECRET
SharePoint Domain:  example.sharepoint.com
Folder Type:        sites
Site Address:       it-assets
List Name:          Assets
User Email Field:  Email
```

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/a6adb736a528d63d9d04b466e73ca8bd9446ec02">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/cc784ab7cf7754a10fa01950ebaf27cc37a8a8df">Broken link</a></td></tr><tr><td><strong>Delete Item In List</strong></td><td>Delete list items for matched assets.</td><td><a href="broken://pages/ebc46eb15c94cb6b5834ba214d29664fc0f6c256">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.3.0.
{% endhint %}
