Dynamically assign organization using Grafana Generic OAuth

Hi,

I’m trying to set up Grafana with Generic OAuth. So far, it works, but I’m currently struggling with the organization assignment. From what I understand, using org_mapping will result in a “static” mapping. But my organizations (within my local app and also Grafana) are created dynamically, and when a user wants to log in in Grafana, I would like to provide the information back using the OAuth scopes/claims, in which organization the user should be assigned during that session, without the need of having that organization hardcoded in the org_mapping setting. Is there a way which I can go?

Thanks in advance!

Best regards
Matthias