Each emirate in the UAE has their own General Directorate of Residence and Foreigners Affairs (previously called Department of Naturalization and Residency) to take care of immigration, visa, and entry permit related issues; search for and apprehend overstayers and illegal immigrants; and issue and renew UAE passports for UAE nationals. Most residents of the UAE are not immigrants in the normal sense of the word (meaning those wishing to move to a country, settle there, and obtain citizenship of that country), but resident expatriates with a UAE residence visa (or permit) that allows them to live in the UAE for a period of time (usually 2 or 3 years between renewals, sometimes 1 year). For all issues to do with permission to visit and/or live in the UAE, contact the relevant immigration office in the emirate in which you live or plan to live. If visiting the UAE, contact the immigration office of the emirate in which you expect to arrive. Note that Al Ain is not an emirate, it is a city in the emirate of Abu Dhabi. Note also that although immigration rules are federal, they are not applied consistently in each emirate. Sharjah especially, seems to do their own thing.
What you do today can improve all your tomorrows.Ralph Marston