# How to create user

**URL:** <https://community.influxdata.com/t/how-to-create-user/33655>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [March 22, 2024, 4:55am UTC](https://community.influxdata.com/t/how-to-create-user/33655 "2024-03-22T04:55:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://community.influxdata.com/u/Leo)\
**Post date:** [March 22, 2024, 4:55am UTC](https://community.influxdata.com/t/how-to-create-user/33655/1 "2024-03-22T04:55:50Z")

</div>

I want to create a user with limited authority, who can visit and wirite in only one specify bucket.  
refer to [create user](https://docs.influxdata.com/influxdb/v2/admin/users/create-user/) I execute the fellow：

```auto
.\influx user create --name test --password ExAmPl3PA55W0rD --org-id org_id

```

but 401 error occur as fellow:

 ![20240322-124657](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/6/617cccb5e27253ad12a28c2714dde4a1e9cf701e.jpeg)

how should I do to create the user?  
Thanks

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [March 22, 2024, 3:52pm UTC](https://community.influxdata.com/t/how-to-create-user/33655/2 "2024-03-22T15:52:04Z")

</div>

Hello @Leo,  
Did you set up an influx config first before using the cli?

> **[influx config create | InfluxDB OSS v2 Documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/config/create/)**
>
> The influx config create command creates a InfluxDB connection configuration.

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://community.influxdata.com/u/Leo)\
**Post date:** [March 25, 2024, 1:37am UTC](https://community.influxdata.com/t/how-to-create-user/33655/4 "2024-03-25T01:37:12Z")

</div>

1. yes, config have been created. And I use all access api tokend to create this config.  

2. Is there any complete reference about how to create user and create authorization for the user?

Thank you very much.
