In this paper, the uniqueness of the solution of electromagnetic boundary-value problems is investigated and, in some cases, proven. The boundary-value problems considered are always defined in limited regions containing linear dielectric materials that are neither lossy nor lossless everywhere. The boundary conditions are given by specifying over the closed boundaries either the tangential components of the electric field or the tangential components of the magnetic field (or possibly by specifying the tangential components of the electric field over part of the boundaries and the tangential components of the magnetic field over the rest of the boundaries). In particular, the solution is proven to be unique in the case of linear dielectric materials which are piecewise homogeneous and lossless, except for some linear and lossy subregions that may be inhomogeneous. As a byproduct of this analysis, one can conclude that a cavity resonator, loaded with linear and lossy dielectrics together with linear piecewise homogeneous and lossless dielectric materials, does not admit undamped resonances.