to attempt to influence or get into the good graces of someone by making themselves more likable or appealing to that person, or by flattering them;
e.g. He was trying to ingratiate himself with the family, so that he would be able to spend their money.