Let G be an even orthogonal or unitary group over a number field. Based on the same observation used in [GI18], we prove the Arthur's multiplicity formula for the generic part of the automorphic discrete spectrum of G by using the theta lift. We also consider a class of non-generic A-parameters and obtain a multiplicity formula in this case. In particular, we obtain a description of the full automorphic discrete spectrum of even orthogonal or unitary groups with Witt index less or equal to one.In the case [E : F ] = 2, we denote by ω E/F the quadratic character of F × (or F × \A × if F is global, and similarly in later paragraph) by class field theory, and we fix a trace zero element δ ∈ E × . Let V = V (n) be a finite dimensional vector space over E equipped with a non-degenerate Hermitian c-sesquilinear form •, • V : V × V −→ E.