Done!

What permissions or user roles are required to create a new user in Grafana using grafana-cli?

Technology
Computer Science
Software
Security

Progress

6 steps completed!8.79 sec

Answer

To create a new user in Grafana using the grafana-cli, you typically need to have administrative privileges. Specifically, you must have a user role that allows you to manage users, such as:

  1. Admin Role: This role has full access to all features in Grafana, including user management. Only admins should use grafana-cli to add or modify users.

  2. Required Permissions: The ability to manage users, including creating new users, is governed by the permissions assigned to the Admin role.

To create a new user using grafana-cli, you would use the following command:

grafana-cli admin reset-admin-password <new_password>

However, it's important to note that while you can reset the admin password, the grafana-cli does not have a direct command for creating new users. New users are usually added via the Grafana UI or through the Grafana API (if you have the appropriate tokens and permissions).

If you want to use the API, make sure you have the necessary permissions and use an admin API key for authentication.