Hi,
I tried many way to create orgs in Grafana using API key instead of using Basic Auth mechanism. However, it always gives some permission related errors. Please see the steps I followed for checking this feature.
- Logged into Grafana as an admin user
- Created an API key in my Grafana with “Admin” role.
- Used the API in curl request as showing below.
curl -X POST --insecure -H “Content-Type: application/json” -H “Authorization: Bearer eyJrIjoiU1IySTlZWEpOSAVVQUtaRlh0UkhZZXU1YFRnRmhuMG0iLCJuIjoidGVzdCIsImlkIjo3OX0=” -d ‘{“name”:“TESTORG”}’ https://test-grafana.test.com/api/orgs
When I execute the above curl request I am getting following error in the json respose.
{“message”:“Access denied”}
Kindly help me to fix this issue.
Thank You,