Regarding this scene, Almighty Allah said: And when they entered according to their father's advice, it did not avail them in the least against (the Will of) Allah, it was but a need of Jacob's inner-self which he discharged. And verily, he was endowed with knowledge because We had taught him, but most men know not. And when they went in before Joseph, he betook his brother (Benjamin) to himself and said: "Verily! I am your brother, so grieve not for what they used to do."
So when he had furnished them forth with their provisions, he put the (golden) bowl into his brother's bag. Then a crier cried: "0 you (in) the caravan! Surely, you are thieves!" They, turning towards them, said: "What is it that you have missed?"
They said: "We have missed the (golden) bowl of the king and for him who produces it is (the reward of) a camel load; I will be bound by it."
They said: "By Allah! Indeed you know that we came not to make mischief in the land, and we are no thieves!"
They (Joseph's brothers) said: "The penalty should be that he, in whose bag it is found, should be held for the punishment (of the crime). Thus we punish the Zalimeen (wrong-doers, etc.)!"
So he (Joseph) began (the search) in their bags before the bag of his brother. Then he brought it out of his brother's bag. Thus did We plan for Joseph. He could not take his brother by the law of the king (as a slave), except that Allah willed it. (So Allah made the brothers to bind themselves with their way of "punishment, i.e. enslaving of a thief") We raise to degrees whom We please, but over all those endowed with knowledge is the All-Knowing (Allah).
They (Joseph's brothers) said: "If he steals, there was a brother of his (Joseph) who did steal before (him)." But these things did Joseph keep in himself, revealing not the secrets to them. He said (within himself): "You are in worst case, and Allah knows best the truth of what you assert!"
They said: "0 ruler of the land! Verily, he has an old father (who will grieve for him); so take one of us in his place. Indeed we think that you are one of the good-doers."
He said: "Allah forbid, that we should take anyone but him with whom we found our property. Indeed (if we did so), we shall be Zalimun (wrong-doers)."
So, when they despaired of him, they held a conference in private. The eldest among them said: "Know you not that you father did take an oath from you in Allah's name, and before this you did fail in your duty with Joseph? Therefore I will not leave this land until my father permits me, or Allah decides my case (by releasing Benjamin) and He is the Best of the judges." Surah 12: 68-80