# Influx cli error: no organization with name \[foo\]

**URL:** <https://community.influxdata.com/t/influx-cli-error-no-organization-with-name-foo/30038>\
**Category:** InfluxDB 2\
**Created:** [May 22, 2023, 8:06pm UTC](https://community.influxdata.com/t/influx-cli-error-no-organization-with-name-foo/30038 "2023-05-22T20:06:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BabyFnord](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/babyfnord/32/13516_2.png) [@BabyFnord](https://community.influxdata.com/u/BabyFnord)\
**Post date:** [May 22, 2023, 8:06pm UTC](https://community.influxdata.com/t/influx-cli-error-no-organization-with-name-foo/30038/1 "2023-05-22T20:06:49Z")

</div>

Hi folks,

I’m new to InfluxDB2 and had a bumpy start getting my toolchain going. I am running InfluxDB 2.6.1 on a Linux Debian hosted shared-system, along with MQTT, Telegraf and Grafana. The toolchain seems to be functional, I can see stuff happening on my dashboard but run into problems fine-tuning the system and create telegraf-buckets for downsampled data:  
`$ influx bucket create -o "foo" -n telegraf/day --retention 1d --shard-group-duration 1h`  
as well as  
`$ influx bucket create -o foo -n telegraf/day -r 1d --shard-group-duration 1h`  
and  
`$ influx bucket create -o "foo" -n telegraf/day -r 1d --shard-group-duration 1h -t MYTOKEN`  
all return  
`Error: no organization with name "foo"`

Interestingly, `$ influx auth list` returns an empty list  
`ID	Description	Token	User Name	User ID	Permissions`  
as does `$ influx auth list -t MYTOKEN` and `$ influx org ls`  
`ID	Name`  
but  
`$ influx config list` returns

```auto
Active	Name URL Org
*	onboarding	https:/url.org	foo
	default http://localhost:8086	foo

```

and `foo` is the organization shown in the WebGUI. The WebGUI shows the existing and functional bucket, as does `$ influx bucket ls`

```auto
ID Name Retention	Shard group duration	Organization ID Schema Type
[ID]	telegraf/actual	23h59m59s	2h0m0s [anotherID]	implicit

```

I’m pretty much stuck here. My assumption is, that probably not having necessary `sudo` privileges, hence my InfluxDB instance running under my hosted-system username which is different to the admin user I use to login into the WebGUI, messes this up.

While the WebGUI is nice, I don’t see a way how to translate the command  
`influx bucket create -o foo -n telegraf/day -r 1d --shard-group-duration 1h`  
in the WebGUI 🤷🏻‍♂️.

Any pointers taken, thanks!  
BF

---

<div class="post-metadata">

**Author:** ![BabyFnord](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/babyfnord/32/13516_2.png) [@BabyFnord](https://community.influxdata.com/u/BabyFnord)\
**Post date:** [May 24, 2023, 2:57pm UTC](https://community.influxdata.com/t/influx-cli-error-no-organization-with-name-foo/30038/2 "2023-05-24T14:57:48Z")

</div>

While I managed to create some more buckets and corresponding downsampling tasks in the UI, none won’t show up as I try to list them via cli.

Now, IF the UI would allow for setting shards and shard groups like `--shard-group-duration 1h` for any of the existing buckets, too, then I’d be all set. As far as I can see it, the UI has no functionality for shards, nor is there a directory containing config files which would allow for manual editing.

Again, any pointers taken to set shards via UI or editor.

---

<div class="post-metadata">

**Author:** ![lower](https://avatars.discourse-cdn.com/v4/letter/l/76d3ee/32.png) [@lower](https://community.influxdata.com/u/lower)\
**Post date:** [December 31, 2023, 11:22pm UTC](https://community.influxdata.com/t/influx-cli-error-no-organization-with-name-foo/30038/3 "2023-12-31T23:22:55Z")

</div>

I am also getting started and have the same issue with Windows CLI.  
Tried making a new config (testconfig2) and new all access token.

The Org “data” exists in the UI.

Please advise.

PS\> .\influx.exe config list  
Active Name URL Org  
testconfig --my URLhere-- data  
testconfig2 --my URL here-- data  
PS\> .\influx.exe bucket list  
ID Name Retention Shard group duration Organization ID Schema Type  
PS\> .\influx.exe query “buckets()” # nothing shows up but I have 3 buckets in the UI  
Error: failed to execute query: 404 Not Found: no buckets found in organization xxxxx  
PS\> .\influx.exe bucket create -n bucket3 # org=data does exist  
Error: no organization with name “data”

PS C:\Program Files\InfluxData\> .\influx.exe version  
Influx CLI dev (git: none) build\_date: 2023-04-28T14:24:13Z
