# Remove from Community

Unshare a file or folder from a Salesforce record and its Experience Cloud (community) users. Backed by the Client.unshareResources() Apex method.

> Kind: Apex method · Updated: 2026-07-01

## Signature

```apex
global static void unshareResources(
  List<Types.UnshareResourceInput> unshareResourceInputs,
  String library,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| unshareResourceInputs | List&lt;<a href="#/apex-type-unshare-resource-input">Types.UnshareResourceInput</a>&gt; | required | List of Types.UnshareResourceInput entries — one per resource to unshare from the community. |
| library | String | required | Type of library (for example, sharepoint). You can get this value from the Content Library. |
| runAs | String | optional | Email Id of the user on whose behalf the function should run. To run the action as the automation user, supply integrationUser. |

## Return Type

void

## Example

```apex
List<cldfs.Types.UnshareResourceInput> unshareResourceInputs = new List<cldfs.Types.UnshareResourceInput> {
    new cldfs.Types.UnshareResourceInput(
        '01KEHAKUXVID7NMSLZINGKUXGQ3SIT75CM',
        'file',
        '001dL00000Wonj3QAB'
    )
};
cldfs.Client.unshareResources(unshareResourceInputs, 'sharepoint', 'integrationUser');
```

> **Method name** — This page is titled Remove from Community, but the underlying Apex method is Client.unshareResources(), invoked as cldfs.Client.unshareResources(...).
