  In this study, we present a modelling of the X-ray emission from the
simulated SMBHs within the cosmological hydrodynamical Magneticum Pathfinder
Simulation, in order to study the statistical properties of the resulting X-ray
Active Galactic Nuclei (AGN) population and their expected contribution to the
X-ray flux from galaxy clusters. The simulations reproduce the evolution of the
observed unabsorbed AGN bolometric luminosity functions (LFs) up to redshift
z~2, consistently with previous works. Furthermore, we study the evolution of
the LFs in the soft (SXR) and hard (HXR) X-ray bands by means of synthetic
X-ray data generated with the PHOX simulator, that includes an
observationally-motivated modelling of an instrinsic absorption component,
mimicking the torus around the AGN. The reconstructed SXR and HXR AGN LFs
present a remarkable agreement with observational data up to z~2 when an
additional obscuration fraction for Compton-thick AGN is assumed, although a
discrepancy still exists for the SXR LF at z=2.3. With this approach, we also
generate full eROSITA mock observations to predict the level of contamination
due to AGN of the intra-cluster medium (ICM) X-ray emission, which can affect
cluster detection especially at high redshifts. We find that, at z~1-1.5, for
20-40% of the clusters with M500>3e13 Msun/h, the AGN counts in the observed
SXR band exceed by more than a factor of 2 the counts from the whole ICM.
