Officers from the New York City Police Department went undercover to gather information on liberal political groups and their members, The Associated Press reported Friday.