Dame Sarah Mullally made the oath of allegiance to the monarch in a ceremony which dates back to the 16th century.