First of all, it should be clear that to visit Madinah is not a rite of Hajj or `Umrah, but the unique merits of the Prophet’s city, his mosque, and his sacred tomb attract every pilgrim or one performing `Umrah to visit it. One may choose whether or not to visit Madiniah, and whether to do so before or after the Hajj or `Umrah. There is no ihram or talbiyah for the visit to Madinah or the Prophet’s Mosque.

With this stated one can go to Madinah first, before making the intention for `Umrah. From Madinah you can make the intention for `Umrah and to wear ihram from Madinah bearing into consideration that your miqat in that case is the miqat of people of Madinah.

Almighty Allah knows best.