Influx.exe cli 2.2 not able to create user or list on influxdb2

Hello

i installed my influxdb2 following the documentation instructions, the DB is up, the gui is working and data are sent to the influxdb2 through telegraf.

i’m now wanting to create users, for this i downloaded the latest CLI, i created a config using the API token generated (and even the API of the first admin account)

in the console, i have empty result or when i try to create user it say there is no organisation (i checked twice no typo on the name of the organisation

D:\temp\influxdb2-client-2.20>influx user list
ID      Name

D:\temp\influxdb2-client-2.20>influx user create --name userlambda --password <password>
Error: no organization with name "lololo"

influx ping say ok

i set influxdb in debug mode to get some infos from influxdb

ts=2021-12-30T10:43:50.627272Z lvl=debug msg=Request log_id=0YjjoJyW000 service=http method=GET host=localhost:8086 path=/api/v2/orgs query="org=lololo" proto=HTTP/1.1 status_code=200 response_size=56 content_length=0 referrer= remote=127.0.0.1:50131 user_agent=influx took=0.525ms body=
ts=2021-12-30T10:43:51.622372Z lvl=debug msg=Request log_id=0YjjoJyW000 service=http method=GET host=localhost:8086 path=/metrics query= proto=HTTP/1.1 status_code=200 response_size=2687 content_length=0 referrer= remote=127.0.0.1:50112 user_agent=Go-http-client took=1.086ms body=
ts=2021-12-30T10:43:52.122471Z lvl=debug msg="user find by ID" log_id=0YjjoJyW000 store=new took=0.000ms
ts=2021-12-30T10:43:52.122471Z lvl=debug msg="orgs find" log_id=0YjjoJyW000 store=new took=0.000ms
ts=2021-12-30T10:43:52.122471Z lvl=debug msg="Orgs retrieved" log_id=0YjjoJyW000 handler=org org=[]
ts=2021-12-30T10:43:52.123011Z lvl=debug msg=Request log_id=0YjjoJyW000 service=http method=GET host=localhost:8086 path=/api/v2/orgs query="org=lololo" proto=HTTP/1.1 status_code=200 response_size=56 content_length=0 referrer= remote=127.0.0.1:50134 user_agent=influx took=0.540ms body=
ts=2021-12-30T10:43:53.190902Z lvl=debug msg="user find by ID" log_id=0YjjoJyW000 store=new took=0.000ms
ts=2021-12-30T10:43:53.190902Z lvl=debug msg="orgs find" log_id=0YjjoJyW000 store=new took=0.000ms
ts=2021-12-30T10:43:53.190902Z lvl=debug msg="Orgs retrieved" log_id=0YjjoJyW000 handler=org org=[]

seems all ok for influxdb

any suggestions?
is there a way to set a debug mode for the CLI?
is there a way the influx.exe ping be more verbose?

regards
Tonic

Having this same issue - for me it turned out to be that I needed to create an additional API all-access token from the admin user account in the UI and use that in my CLI config.

Do you have a CLI config set up and set to active? If not, then you need to provide your token with the command. I’m also guessing that only an operator token has the permissions necessary to create new users.

You’re right - the all-access token doesn’t have write permissions. I do have a config set up and active and it looks to be working properly; I can now see users/orgs. Is there a way to find the current operator token in the UI? also, thank you for the reply, really appreciate it.

I’m not 100% sure on this, but I think to see the operator token, you need to be logged into the user account associated with the operator token (typically the account you created during the InfluxDB setup process). You may even need to be in the initial organization also created during the setup process.

OK - I’ll have to do some sleuthing then. Thank you so much for your guidance!