gdg icon indicating copy to clipboard operation
gdg copied to clipboard

CRUD for Teams and Team Memberships

Open FrankAnk opened this issue 2 years ago • 4 comments

It would be great if we had this to manage Teams as well as Users see: https://grafana.com/docs/grafana/latest/http_api/team/

FrankAnk avatar Jun 01 '22 12:06 FrankAnk

hello @FrankAnk. I'll have a look to see if the SDK supports this. Do you know by any chance when it was released, I don't think team is a concept I was familiar with till now.

safaci2000 avatar Jun 08 '22 23:06 safaci2000

Teams has been part of Grafana for a while, you can authorize Teams to access folders. The users are added to the team as members to receive the rights assigned to the team. This concept was introduced with Version 5.1 and we are now at Version 8.5.

See: https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/ and: https://grafana.com/tutorials/create-users-and-teams/

HTTP API Reference: https://grafana.com/docs/grafana/latest/http_api/

FrankAnk avatar Jun 10 '22 05:06 FrankAnk

This requires SDK Changes so will revisit this a bit later. There's some talk about an official (community supported) SDK so maybe that'll be more feature complete, otherwise will try to address this time pending. Per usual any PR is welcome.

SDK can be found here

safaci2000 avatar Jun 29 '22 13:06 safaci2000

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 29 '22 02:08 github-actions[bot]

@FrankAnk I'm revisiting this ticket again. Just to clarify you're looking to save the state of the team memberships in grafana, not to add/delete users via GDG, correct?

csg33k avatar Dec 12 '22 15:12 csg33k

@FrankAnk I'm revisiting this ticket again. Just to clarify you're looking to save the state of the team memberships in grafana, not to add/delete users via GDG, correct?

This is correct! We have the users authenticated using LDAP, but team memberships need to be defined in Grafana and managed with GDG. As of Grafana version 9.3 we would also like to manage notification channels and alert rules with GDG if possible.

FrankAnk avatar Dec 12 '22 16:12 FrankAnk

Hi @FrankAnk , de are using this script to sync users to Team members. LDAP sync Regards, Sascha

mc-chaos avatar Dec 12 '22 18:12 mc-chaos

Thanks @mc-chaos Sascha, i'll give it a try! I was hoping to just use one tool to manage everything.

Regards, Franklin

FrankAnk avatar Dec 13 '22 14:12 FrankAnk