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


## Description

> Macro (excerpt)
> 
> Returns the account id for the provided username.

Returns the account id for the provided username.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | usernameToAccountId(username) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| username | String | Yes | User name. |

## Return Type

**String**

Returns the account id.

## Example

```javascript
string accountId = usernameToUserKey("someUsername");
```

## See also

> Macro (contentbylabel)