OIDC identity provider automatic groups creation

Hi there,

In my use case I have configured microsoft as an identity provider (through oidc).
What I am missing is that upon login, I would like assigned groups coming from Microsoft to be created within Keycloak. Group creation should respect original hierarchy.

I thought it was a quite common scenario but I can’t find any resource or thread about it.

Can someone point me to the right direction?
Thanks,
Carlo