Labour's Rupa Huq (Ealing Central and Acton) asked Mr Johnson if he was a "man of his word" after he "courted popularity with pledging an amnesty for illegal immigrants" as London mayor.
"I must say it didn't receive an overwhelming endorsement from the previous prime minister when I put it to her when I raised it once in Cabinet.
He continued: "We know the difficulties that can be caused and I do think - yes, I will answer her directly - I do think we need to look at our arrangements for people who have lived and worked here for a long time unable to enter the economy, unable to participate properly or pay taxes without documents.
"We should look at it and the truth is, the law already basically allows them an effective amnesty, that's basically where we have settled now.
"But we should look at the economic advantages and disadvantages of going ahead with the policy that she described, and which I think she and I share."