CdTe thin films have been deposited using spray pyrolysis technique without and with in situ CdCl2 treatment. Scanning electron microscopy studies show enhanced grain growth in the presence of CdCl2. Glancing angle incidence X-ray diffraction is used for the micro structural study of polycrystalline CdS/CdTe heterostructure at different depths by changing the incident angle. Spraying of CdCl2 on CdS prior to CdTe deposition promotes S diffusion throughout CdTe film and also Te diffusion into CdS. Whereas spraying of CdCl2 in between CdTe deposition prevents S diffusion partially and Te diffusion completely. There is an associated change in the microstress of the CdTe film at different layers. The films without CdCl2 treatment show compressive microstress varying from −98 to −158 MPa with increasing incident angle. CdCl2 spray during CdTe deposition shows compressive microstress, which varies from −98 MPa at the interface to −19 MPa near the surface and CdCl2 spray prior to CdTe deposition leads to a mildly tensile stress, from +40 to +20 MPa, which is very close to the standard shear stress of 10 MPa for CdTe.