The PhD fellow/scholar must have a residence permit and a work permit before he/she is employed by the university. Employment cannot happen until the residence and work permit is settled. Please see this page: https://www.workindenmark.dk/Working-in-DK/Residence-and-work-permit
For further information please see: