---
title: "getCustomersObjects"
canonical: "https://support.appfire.com/space/PSJC/843612872/getCustomersObjects"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)



> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getCustomersObjects(serviceDeskId[, displayNameOrNameOrEmail]) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns an array of JUser structures

Returns an array of JUser structures

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | serviceDeskId | number | Yes | The ID of the service desk for which the customers will be retrieved |
> | displayNameOrNameOrEmail | string | No | A string that fully or partially describes a customer's name, or display name, or email - used for filter the customers |

## Return Type

**[JUser[]](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/435028065)**

## Examples

### Example 1

```
return getCustomersObjects(1);
```

Returns an array of JUser structures.

### Example 2

Returns an array of JUser structures, filtered by their name, display name or email using the string "John".

```
return getCustomersObjects(1, "John");
```

## See also

> Macro (contentbylabel)

> Macro (fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macro)