Immigration Act Article 37

The National Immigration Agency can request concerned departments or organizations for assistance or necessary information that would help investigate nationals without household registration in the Taiwan Area and are involved in any of the cases mentioned in Paragraphs 1 and 2 of Article 15, as well as aliens who are involved in any of the cases indicated in Paragraph 1 of the preceding Article. The requested departments or organizations must not reject the request except for justifiable reasons.When nationals without household registration in the Taiwan Area or aliens have served out their sentences or will be released for a reason, the prison facility, vocational training facility, drug rehabilitation center, reform school, or correctional school should notify the National Immigration Agency.
中文原文 入出國及移民法第37條
移民署對臺灣地區無戶籍國民涉有第十五條第一項或外國人涉有前條第一項、第二項各款情形之一者,為調查之需,得請求有關機關、團體協助或提供必要之資料。
被請求之機關、團體非有正當理由,不得拒絕。
監獄、技能訓練所、戒治所、少年輔育院及矯正學校,對於臺灣地區無戶籍國民或外國人,於執行完畢或其他理由釋放者,應通知移民署。

English translation for reference only; the Chinese text prevails. Not legal advice.