Customs fields and take info AD

How can I add the “Department” field to the rocket chat, and so that the information in this field is taken from Active Directory?