---
title: "userSpacePermissions"
canonical: "https://support.appfire.com/space/PSCONF/15306850/userSpacePermissions"
format: markdown
---
> Macro (aura-html)

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

## Description

> Macro (excerpt)
> 
> Returns the permissions of the provided user in the space.

Returns the permissions of the provided user in the space.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | spaceKey | String | Yes | The key of the space to get permissions for. |
> | userNameOrKey | String | Yes | User name or key of a user to get permissions for. |

## Return Type

**String []**

## Example

Retrieves space permissions of user "jdoe" for space with key "PS-DOCS".

```javascript
string[] permissions = userSpacePermissions("PS-DOCS", "jdoe");
```

## See also

> Macro (contentbylabel)