# GetUser

Retrieve a single user

`GET /api/v2/accounts/{accountId}/users/{id}`

**API:** AvaTax API
**Tag:** Users
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/Users/GetUser/

## Description

Get the user object identified by this URL.
A user represents one person with access privileges to make API calls and work with a specific account.
            
 You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
            
* FetchDeleted

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, AvaTaxOnlyUserAdmin, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | integer | path | Yes | The ID of the user to retrieve. |
| `accountId` | integer | path | Yes | The accountID of the user you wish to get. |
| `$include` | string | query | No | Optional fetch commands. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `UserModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `UserModel`

An account user who is permitted to use AvaTax.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | **Yes** | The unique ID number of this user. Example: `12345`. |
| `accountId` | integer | **Yes** | The unique ID number of the account to which this user belongs. Example: `123456789`. |
| `companyId` | integer | No | If this user is locked to one company (and its children), this is the unique ID number of the company to which this user belongs. Example: `123456`. |
| `userName` | string | **Yes** | The username which is used to log on to the AvaTax website, or to authenticate against API calls. Example: `bobExample`. |
| `firstName` | string | **Yes** | The first or given name of the user. Example: `Bob`. |
| `lastName` | string | **Yes** | The last or family name of the user. Example: `Example`. |
| `email` | string | **Yes** | The email address to be used to contact this user.  If the user has forgotten a password, an email can be sent to this email address with information on how to reset this password. Example: `bob@example.org`. |
| `postalCode` | string | No | The postal code in which this user resides. Example: `98110`. |
| `securityRoleId` | string | **Yes** | The security level for this user. Values: `NoAccess`, `SiteAdmin`, `AccountOperator`, `AccountAdmin`, `AccountUser`, `SystemAdmin`, `Registrar`, `CSPTester`, `CSPAdmin`, `SystemOperator`, `TechnicalSupportUser`, `TechnicalSupportAdmin`, `TreasuryUser`, `TreasuryAdmin`, `ComplianceUser`, `ComplianceAdmin`, `ProStoresOperator`, `CompanyUser`, `CompanyAdmin`, `ComplianceTempUser`, `ComplianceRootUser`, `ComplianceOperator`, `SSTAdmin`, `FirmUser`, `FirmAdmin`, `BatchServiceAdmin`, `ECMAccountUser`, `ECMCompanyUser`, `ReturnsOnlyAccountAdmin`, `ReturnsOnlyAccountUser`, `ReturnsOnlyCompanyAdmin`, `ReturnsOnlyCompanyUser`, `AvaTaxOnlyAccountAdmin`, `AvaTaxOnlyAccountUser`, `AvaTaxOnlyCompanyAdmin`, `AvaTaxOnlyCompanyUser`, `AvaTaxOnlyUserAdmin`. Example: `NoAccess`. |
| `passwordStatus` | string | No | The status of the user's password. For a new user created, this is always going to be `UserMustChange` Values: `UserCannotChange`, `UserCanChange`, `UserMustChange`. Example: `UserCannotChange`. |
| `isActive` | boolean | No | True if this user is currently active. Example: `true`. |
| `createdDate` | string | No | The date when this record was created. |
| `modifiedDate` | string | No | The date/time when this record was last modified. |
| `subjectId` | string | No | Matches the subjectId of corresponding user record in AI. |
| `migratedDate` | string | No | The date/time when this record was migrated to Avalara Identity modified. |
| `suppressNewUserEmail` | boolean | No | Suppress new user email |
| `isDeleted` | boolean | No | A boolean flag to identify if the user is deleted |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/accounts/{accountId}/users/{id}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```