  We extend the Delorme-Guichardet characterization of Kazhdan property $T$
groups to $r$-discrete measured groupoids. We give several applications, in
particular to stability results of Kazhdan property $T$ and to the study of
cocycles taking values in a group having the Haagerup property.
