Do one’s duty

To do one’s job or what is expected of one.

The guard was doing his duty when he began to ask the customer questions.