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


## Description

> Macro (excerpt)
> 
> Returns the username for the provided user key.

Returns the username for the provided user key.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | userKeyToUsername(userKey) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| user key | String | Yes | User key. |

## Return Type

**String**

Returns the username

## Example

```javascript
string username = userKeyToUsername("someUserKey");
```

## See also

> Macro (contentbylabel)