The invention relates to a polymer comprising alkoxysilane groups, obtained by polycondensation of a diisocyanate, of a difunctional compound and of two different alkoxysilanes.The invention also relates to a cosmetic composition comprising such a polymer and to a process for caring for or making up keratin materials by application of the composition to the keratin materials.