Joseph was no longer able to control his feelings in front of his servants, so he ordered them all to leave the room. No one else was with him when Joseph told his brothers who he was. 1
References for Genesis 45:1
He cried with such loud sobs that the Egyptians heard it, and the news was taken to the king's palace.
Joseph said to his brothers, "I am Joseph. Is my father still alive?" But when his brothers heard this, they were so terrified that they could not answer.
Then Joseph said to them, "Please come closer." They did, and he said, "I am your brother Joseph, whom you sold into Egypt.
Now do not be upset or blame yourselves because you sold me here. It was really God who sent me ahead of you to save people's lives.
This is only the second year of famine in the land; there will be five more years in which there will be neither plowing nor reaping.