---
title: "usersInSpacePermission routine"
canonical: "https://support.appfire.com/space/PSCONF/15303895/usersInSpacePermission%20routine"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | usersInSpacePermission(spaceKey, permissionType) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns users that correspond to a certain permission in the specified space.

Returns users that correspond to a certain permission in the specified space.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | spaceKey | String | Yes | Key of the space to investigate. |
> | permissionType | String | Yes | Valid space permission type to search for. |

## Return Type

**String []**

## Example

```javascript
string[] users = usersInSpacePermission("PP", "EDITSPACE");
```

## See also

> Macro (contentbylabel)