I know Joseph won pharaoh’s favor and essentially turned a bad situation into a good situation, but that’s all well and good only so long as pharaoh is being reasonable, you could say. The moment pharaoh might have had an evil thought, and made some sort of decision like, “as my most trusted second in command in all of Egypt, I want you to go take care of a tribe of Israelites at the border. Surprise them in the night, and kill them all,” then immediately you have a problem.
Joseph rose very high in Egypt but he was still under the pharaoh’s command. So my question in the midrash is there a record of any situation like this ever having arisen, where Joseph had to commit evil acts under pharaoh’s orders, even against his own people?