Federal prosecutors in Manhattan are investigating whether Michael Cohen, the longtime personal lawyer for Donald Trump, illegally engaged in secret lobbying, people familiar with the investigation said, as part of the government’s broader probe into Cohen’s business dealings.

In the course of that investigation, the prosecutors have contacted companies that hired Cohen as a consultant after Trump won the 2016 presidential election, including AT&T Inc. T, -2.24% and Novartis AG NVS, -1.65% , according to other people familiar with the matter. The companies paid a total of about $1.8 million to Cohen in 2017 and early 2018 for his insights into the Trump administration.