# Manage & Operate › Identity & Access Management › Identities › Local Users API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Manage & Operate product's sections: https://developers.eu.ovhcloud.com/reference/manage-operate/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 7 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/manage-operate/identity-access-management/identities/local-users.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/manage-operate/identity-access-management/identities/local-users.json?format=openapi3

## Operations

- `GET /me/identity/user` — Retrieve all IAM users of this account
- `POST /me/identity/user` — Create a new IAM user
- `GET /me/identity/user/{user}` — Get an IAM user
- `PUT /me/identity/user/{user}` — Alter an IAM user
- `DELETE /me/identity/user/{user}` — Delete an IAM user
- `POST /me/identity/user/{user}/disable` — Disable this user
- `POST /me/identity/user/{user}/enable` — Enable this user

## Retrieve all IAM users of this account

`GET /1.0/me/identity/user`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#get-me-identity-user

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/identity/user")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/identity/user");

print_r($result);
?>
```

## Create a new IAM user

`POST /1.0/me/identity/user`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#post-me-identity-user

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/create`

### Request body (required)

Type: `auth.UserRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | User's description |
| `email` | string |  | User's email |
| `group` | string |  | User's group |
| `login` | string | yes | User's login |
| `password` | string (password) |  | User's password |
| `type` | auth.UserTypeEnum |  | Type of user to create — one of `ROOT`, `SERVICE`, `USER` |

```json
{
  "description": "string",
  "email": "string",
  "group": "string",
  "login": "string",
  "password": "string",
  "type": "ROOT"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: auth.UserRequest
result = client.post("/me/identity/user",
	description = None, # User's description (type: string)
	email = None, # User's email (type: string)
	group = None, # User's group (type: string)
	login = None, # User's login (type: string)
	password = None, # User's password (type: string)
	type = None, # Type of user to create (type: auth.UserTypeEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: auth.UserRequest
$result = $ovh->post("/me/identity/user", array(
	description => null, // User's description (type: string)
	email => null, // User's email (type: string)
	group => null, // User's group (type: string)
	login => null, // User's login (type: string)
	password => null, // User's password (type: string)
	type => null, // Type of user to create (type: auth.UserTypeEnum)
));

print_r($result);
?>
```

## Get an IAM user

`GET /1.0/me/identity/user/{user}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#get-me-identity-user-user

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | User |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | auth.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | Creation date of this user |
| `description` | string |  | User's description |
| `email` | string |  | User's email |
| `group` | string |  | User's main group |
| `groups` | string[] | read-only | User's groups |
| `lastUpdate` | string (date-time) | read-only | User's last update date |
| `login` | string | read-only | User's login suffix |
| `passwordLastUpdate` | string (date-time) | read-only | User's password last update date |
| `status` | auth.UserStatusEnum | read-only | Current user's status — one of `DISABLED`, `OK`, `PASSWORD_CHANGE_REQUIRED` |
| `type` | auth.UserTypeEnum | read-only | Type of user — one of `ROOT`, `SERVICE`, `USER` |
| `urn` | string | read-only | IAM identity URN of the user |

```json
{
  "creation": "2024-01-01T12:00:00Z",
  "description": "string",
  "email": "string",
  "group": "string",
  "groups": [
    "string"
  ],
  "lastUpdate": "2024-01-01T12:00:00Z",
  "login": "string",
  "passwordLastUpdate": "2024-01-01T12:00:00Z",
  "status": "DISABLED",
  "type": "ROOT",
  "urn": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/identity/user/{user}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/identity/user/{user}");

print_r($result);
?>
```

## Alter an IAM user

`PUT /1.0/me/identity/user/{user}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#put-me-identity-user-user

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | User |

### Request body (required)

Type: `auth.User`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creation` | string (date-time) | read-only | Creation date of this user |
| `description` | string |  | User's description |
| `email` | string |  | User's email |
| `group` | string |  | User's main group |
| `groups` | string[] | read-only | User's groups |
| `lastUpdate` | string (date-time) | read-only | User's last update date |
| `login` | string | read-only | User's login suffix |
| `passwordLastUpdate` | string (date-time) | read-only | User's password last update date |
| `status` | auth.UserStatusEnum | read-only | Current user's status — one of `DISABLED`, `OK`, `PASSWORD_CHANGE_REQUIRED` |
| `type` | auth.UserTypeEnum | read-only | Type of user — one of `ROOT`, `SERVICE`, `USER` |
| `urn` | string | read-only | IAM identity URN of the user |

```json
{
  "description": "string",
  "email": "string",
  "group": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: auth.User
result = client.put("/me/identity/user/{user}",
	description = None, # User's description (type: string)
	email = None, # User's email (type: string, nullable)
	group = None, # User's main group (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: auth.User
$result = $ovh->put("/me/identity/user/{user}", array(
	description => null, // User's description (type: string)
	email => null, // User's email (type: string, nullable)
	group => null, // User's main group (type: string)
));

print_r($result);
?>
```

## Delete an IAM user

`DELETE /1.0/me/identity/user/{user}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#delete-me-identity-user-user

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | User |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/identity/user/{user}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/identity/user/{user}");

print_r($result);
?>
```

## Disable this user

`POST /1.0/me/identity/user/{user}/disable`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#post-me-identity-user-user-disable

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/disable`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | User |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/disable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/identity/user/{user}/disable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/identity/user/{user}/disable");

print_r($result);
?>
```

## Enable this user

`POST /1.0/me/identity/user/{user}/enable`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/identities/local-users/#post-me-identity-user-user-enable

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/identity/user/enable`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | User |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/enable" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/identity/user/{user}/enable")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/identity/user/{user}/enable");

print_r($result);
?>
```
