The observed brightness of Type Ia supernovae is affected by gravitational
lensing caused by the mass distribution along the line of sight, which
introduces an additional dispersion into the Hubble diagram. We look for
evidence of lensing in the SuperNova Legacy Survey 3-year data set. We
investigate the correlation between the residuals from the Hubble diagram and
the gravitational magnification based on a modeling of the mass distribution of
foreground galaxies. A deep photometric catalog, photometric redshifts, and
well established mass luminosity relations are used. We find evidence of a
lensing signal with a 2.3 sigma significance. The current result is limited by
the number of SNe, their redshift distribution, and the other sources of
scatter in the Hubble diagram. Separating the galaxy population into a red and
a blue sample has a positive impact on the significance of the signal
detection. On the other hand, increasing the depth of the galaxy catalog, the
precision of photometric redshifts or reducing the scatter in the mass
luminosity relations have little effect. We show that for the full SuperNova
Legacy Survey sample (~400 spectroscopically confirmed Type Ia SNe and ~200
photometrically identified Type Ia SNe), there is an 80% probability of
detecting the lensing signal with a 3 sigma significance.