In Parshas Mikeitz, Joseph is brought out of prison and presented before Pharaoh as an interpreter of dreams. This is Joseph's opportunity to make a good impression and, hopefully, get out of prison. In this light, it is noteworthy that throughout his conversation with Pharaoh, Joseph repeatedly speaks of God as the source of his knowledge and, more importantly, as the One who controls the fate of Pharaoh and his nation. Even as a powerless prisoner before the most powerful monarch of the age, in an idolatrous land where the king himself was worshiped as a god, Joseph did not hesitate to openly declare the truth of the one Lord of the Universe.
The Shelah Hakadosh (Rabbi Isaiah Horowitz, d.1626) writes that we learn a great lesson from Joseph that a person should always openly acknowledge his dependence and gratitude to God for all that he has. This is the root of the common Jewish practice to add the phrase, "Im yirtzeh Hashem" - "If God wishes" - to all plans for the future, and, when speaking of past success, to acknowledge that the success came about "b'ezras Hashem" - "with the help of God."
If Joseph, even in the most difficult of circumstances, was willing to openly declare his belief, then we, in our ordinary lives, should certainly not hesitate to do so. And we may well be surprised by the impact that our words will have, just as we find by Joseph of whom Pharaoh declared to his servants, "Can we find another like this? A man with the spirit of God in him?"
(ראה של"ה הקדוש, פרשת מקץ - דרך חיים תוכחת מוסר וגם בשער האותיות אות א' אמת ואמונה)