Grafana Azure Auth behind a reverse proxy in kubernetes

hey team,

I’ve a grafana, that is running on the kubernetes and I’m using cloudflare to serve my grafana.

I’m trying to configure my azure app to enable SSO. And issue is starting with my root domain I guess.

When I set my root domain to my kubernetes direct domain (no reverse) and my reply URL to it, it works as expected.

When I set it to my cloudflare (+ with reply URL same) in the azure login it says me we couldn't sign you and no logs at all in the network panel.

I’ve just figured out with the cloudflare domain , azure and my grafana redirects each other million times and then going to endless loop you can see screen below;

Any idea how can I solve this ?