How to assign users to orgs before they login when configuring grafana with keycloak?

We have configured grafana with keycloak, and we want to assign users to orgs before they login but it seems that users are only accessible in grafana when they login. Is there any solution to that?

No. OAuth: Add support for manual org assignment and oauth · Issue #22605 · grafana/grafana · GitHub

can i personalize auto_assign_org_id based on users’ email or username for example, or it’s only applicable to all users at once?

8.4.0-beta1 was released today with this feature:

SAML: Support mapping one user to multiple roles in multiple orgs (using org_mapping setting). (Enterprise)

So proper supported solution is to pay for enterprise version and switch to SAML protocol.

I would read doc about about auto_assign_org_id Configuration | Grafana Labs - doc is good friend.

1 Like