We’re using Keycloak as our authentication provider, with a single realm managing users across multiple client organizations. These clients authenticate via various federated identity providers (OIDC/SAML), with Keycloak acting as the service provider (broker) to initiate and handle authentication.
We’d like to enhance our authentication logs and events by including an additional attribute—either orgId or orgName—so we can easily filter logs specific to a particular organization.
However, I haven’t found a way to achieve this via the admin console. From what I understand, this likely requires a custom logging wrapper or a custom SPI implementation to make orgId available in the log context. If that’s the case, could you please guide me on which SPIs or extensions would be the right starting point for this?
Any advice or pointers would be greatly appreciated. Thanks!