An energy dispersive X-ray spectrometry (EDXS) method is developed to evaluate the composition of alloyed nanoparticles (NPs) where one of the alloying elements is removed under the electron beam during microanalysis with a transmission electron microscope (TEM). The method is demonstrated for alloyed Au-Ag NPs of a diameter ranging from 6 to 20 nm produced by laser evaporation of a water-suspended Ag-Au powder mixture of varying composition. Series of EDXS spectra are recorded for 30 NPs from samples with five different Ag:Au ratios revealing Ag depletion from NPs during electron irradiation. By studying the evolution of NPs composition as a function of dose, the initial Ag content for each NP is extrapolated. The rate of Ag depletion is discussed in terms of sputtering and knock-on damage. On average, approximately one Ag atom is lost from the NP for each Ag L X-ray detected. To assess the limitations of microanalysis in these sensitive nanoscale structures, the concept of detectability limit is adapted to our method. This benchmark is then evaluated for Ag in Au-Ag NPs of various sizes and acquisition times. This study should be regarded as a guide for the design of analytical TEM measurements of beam-sensitive NPs.