# Get Resource Property

Read the value of a property on one or more files or folders from Apex.

> Kind: Apex method · Updated: 2026-10-05

## Signature

```apex
global static List<String> getResourceProperty(
  List<Types.GetResourcePropertyInput> inputs,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| inputs | List&lt;<a href="#/apex-type-get-resource-property-input">Types.GetResourcePropertyInput</a>&gt; | required | One entry per property to read. Each Types.GetResourcePropertyInput names a resource and the property to read from it. |
| 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

List<String&gt;. One value per input, in the same order as the inputs. Text, boolean and number values are returned as text. If the resource does not have the property, the value is an empty string. If the property holds an object or a list, the value is null.

## Example

```apex
cldfs.Resource resource = new cldfs.Resource(
  '01KEHAKUXCQ6YIOFLOPJHJN57Y5EYQTJMZ', // resource Id
  'file', // file or folder
  null, // name
  'sharepoint', // library
  'b!nJBtPq_z5UeJtFrj_f24XEQqlPUD8vtFsg7GBcrXJepiUn9bkb_7QbDPtqHVD-cP' // drive Id
);

List<cldfs.Types.GetResourcePropertyInput> inputs = new List<cldfs.Types.GetResourcePropertyInput>{
  new cldfs.Types.GetResourcePropertyInput(resource, 'name'),
  new cldfs.Types.GetResourcePropertyInput(resource, 'description')
};

List<String> values = cldfs.Client.getResourceProperty(inputs, 'integrationUser');
String name = values[0];
String description = values[1];
```

> **Read several properties in one call** — Each resource is fetched once per call, so reading several properties of the same file in one call costs the same as reading one. To change a property, use Set Resource Property.

> **Testing** — Use ClientFactory with default mock values to get coverage without callouts. See How to get test coverage of code that uses Client methods.
