diff --git a/internal/api/oidc/client.go b/internal/api/oidc/client.go index 80dad0aec4..1412d40fab 100644 --- a/internal/api/oidc/client.go +++ b/internal/api/oidc/client.go @@ -635,6 +635,9 @@ func (o *OPStorage) privateClaimsFlows(ctx context.Context, userID string, userG } func (o *OPStorage) assertRoles(ctx context.Context, userID, applicationID string, requestedRoles []string) (*query.UserGrants, map[string]map[string]string, error) { + if applicationID == "" || len(requestedRoles) == 0 { + return nil, nil, nil + } projectID, err := o.query.ProjectIDFromClientID(ctx, applicationID, false) if err != nil { return nil, nil, err