Home Secretary Sajid Javid has apologised to people who were wrongly forced to take DNA tests to prove they were entitled to settle in the UK.
A Home Office review found there were at least 449 cases where letters had been sent with the demand.
Mr Javid told the House of Commons that some relatives of Gurkhas and Afghan nationals employed by the UK government were among those affected.
It was "unacceptable" and guidance was "unclear or wrong", he said.
The Home Office launched an internal review four months ago after admitting officials wrongly forced immigrants to take DNA tests.
"I want to take this opportunity to apologise to those affected by this practice," Mr Javid told MPs.
"The provision of DNA evidence should always be voluntary and never mandatory."
By Dominic Casciani, BBC home affairs correspondent
The Home Office's internal review of the wrongful DNA demands says the rules were "not clearly understood" - not least because immigration officials are drowning in documents.
There are 40,000 documents in seven IT systems - so it's perhaps no surprise that case workers received advice which was unclear or seemingly contradicted the law.
Given Sajid Javid has only been in post since April, it raises questions for Amber Rudd, who resigned over misleading MPs over illegal immigrant targets, and her predecessor, the prime minister.
Theresa May presided over the Home Office for six years and back in 2012 said she wanted to create a "hostile environment" for illegal immigration.
It's that broader policy objective - which critics say leads to applicants being regarded as suspects - that is under fire yet again.
When Mr Javid committed to cleaning up the injustices done to the Windrush generation, he underlined that "hostile environment" was not a phrase he would use.
The question is whether a massive post-Brexit reform to the immigration system will convince the Home Office's critics that it can treat all people fairly and equally before the law.
Mandatory DNA testing was included as a requirement for a 2013 scheme for Afghan nationals formerly employed by the UK government. This has now been removed, Mr Javid said.
In January 2015, similar guidance on DNA testing was included in a scheme for adult dependent children of Gurkhas, who are Nepalese and have been part of the Army for more than 200 years. Mr Javid said this guidance was wrong.
The Home Office report said DNA evidence was requested in 398 cases as part of a 2016 operation investigating fraud, of which 83 applications were refused.
Seven of those cases were refused solely for not providing DNA evidence.
In a further 51 cases, DNA was requested from relatives of Gurkhas.
"I am determined to get to the bottom of how and why, in some cases, people were compelled to provide DNA in the first place," he told MPs.
"Across our immigration system, no-one should face a demand to supply DNA evidence and no-one should have been penalised for not providing it."
Mr Javid said those affected would be reimbursed and he announced he had set up a task force and a review of the immigration system to be informed by Wendy Williams, who investigated the Windrush scandal.
Enny Choudhury, solicitor at the Joint Council for the Welfare of Immigrants, said a mother and daughter she represented were "rendered destitute" for two and a half years as a result.
"It is clear that countless others will have been subject to the same treatment and it is astonishing that ministers still do not have a grasp on the failings of the Home Office," she said.
Steve Valdez-Symonds, Amnesty UK's Refugee and Migrant Rights Programme Director, said the problems with the Home Office were "systemic, chronic and deep-rooted" and in need of urgent reform.