Hailing from Ballia, Ansari replaced Mohsin Raza, who served as the minister of state for minorities welfare in the previous Yogi Adityanath government.
Ansari took oath as a minister of state.
Thirty-two-year-old Danish had joined the Akhil Bharatiya Vidyarthi Parishad when he was a student at Lucknow University, from where he completed his graduation.
He was nominated to the Urdu Language Committee in the Yogi government in October 2018, with a minister of state status.
Danish was appointed the general secretary of the minorities cell of the Bharatiya Janata Party just before the assembly elections.
He has done his schooling from Ballia's Holy Cross School.
Yogi takes oath as UP CM; Maurya, Pathak his deputies
And Yogi Takes Charge!
'Bulldozer Baba' Yogi Adityanath comes back stronger
Brajesh Pathak replaces Dinesh Sharma as dy CM
KP Maurya back as Yogi's deputy despite poll rout