That is a curious word that is used there. Was not Joseph a man of God, so how could he practice divination? Now this is a real dispute and debate among the commentaries. Regarding Joseph's claim to practice divination, I think Adam Clarke's commentary says it the best: “I take the Hebrew word naachash here in its general acceptance: to view attentively; or to inquire.”
Adam Clarke says that is the way it should be looked at, in more of its general sense rather than some of the more detailed meanings that are given to it later that connect it with divination. The context of other cases in the Old Testament connected it with divination, but in this case, it is not. There is no connection with divination.