diff --git a/internal/auth/repository/eventsourcing/eventstore/auth_request.go b/internal/auth/repository/eventsourcing/eventstore/auth_request.go index 0ea01c10f..6d806ef2a 100644 --- a/internal/auth/repository/eventsourcing/eventstore/auth_request.go +++ b/internal/auth/repository/eventsourcing/eventstore/auth_request.go @@ -858,7 +858,7 @@ func (repo *AuthRequestRepo) checkExternalUserLogin(ctx context.Context, request idQuery, externalIDQuery, } if request.RequestedOrgID != "" { - orgIDQuery, err := query.NewIDPUserLinksResourceOwnerSearchQuery(idpConfigID) + orgIDQuery, err := query.NewIDPUserLinksResourceOwnerSearchQuery(request.RequestedOrgID) if err != nil { return err }