Kadison characterized the diagonals of projections and observed the presence of an integer, which Arveson later recognized as a Fredholm index obstruction applicable to any normal operator with finite spectrum coincident with its essential spectrum whose elements are the vertices of a convex polygon. Recently, in joint work with Kaftal, the author linked the Kadison integer to essential codimension of projections. This paper provides an analogous link between Arveson’s obstruction and essential codimension as well as an entirely new proof of Arveson’s theorem which also allows for generalization to any finite spectrum normal operator. In fact, we prove that Arveson’s theorem is a corollary of a trace invariance property of arbitrary normal operators. An essential ingredient is a nontrivial operator-theoretic formulation of Arveson’s theorem in terms of restricted diagonalization, that is, diagonalization by unitaries which are Hilbert–Schmidt perturbations of the identity.