All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
There is no doubt that spying is strongly forbidden as Allaah Says (what means): {And do not spy.} [Quran 49:12] Besides, Thawbaan narrated that the Prophet, sallallaahu ‘alayhi wa sallam, said: “Do not annoy the Slaves of Allaah, and do not abuse them and do not seek out their faults. Whoever seeks out the faults of his Muslim brother, Allaah will expose his faults until He disgraces him (even if he is hiding) in his own house." [Ahmad]
Nevertheless, the scholars stated that spying is permissible if it leads to a preponderant benefit that could not be achieved except by spying, like spying on the thieves, brigands and the like.
Ibn Al-Maajishoon from the Maaliki School of jurisprudence, said: “In my view, the thieves and brigands should be chased wherever they may be and this can only be done by spying on them and following their whereabouts.”
Therefore, if this job meets these religious conditions, it is permissible to join it otherwise no. For more benefit, please refer to Fatwa 85727.
Allaah Knows best.