Sub claim missing in oauth2 response for Grafana

Hi,
I managed to get oauth2 working with Grafana 11.2.0 on my Nextcloud 29.0.6 thanks to this post.

I see this warning in the grafana.log though:

logger=auth.client.generic_oauth t=2024-09-13T12:38:07.799870302+02:00 level=warn msg=“Missing sub claim, oauth authentication without a sub claim is deprecated and will be rejected in future versions.”

And in order to make oauth working with 11.2.0 I had to add

[auth]
oauth_allow_insecure_email_lookup = true

to my grafana.ini.

Does anyone know what to do, so Nextcloud will “hand out” a subject (see sub claim) in its response?

Thanx.