Genesis 31:54

31:54 Then Jacob offered a sacrifice on the mountain and invited his relatives to eat the meal. They ate the meal and spent the night on the mountain.

Genesis 40:4

40:4 The captain of the guard appointed Joseph to be their attendant, and he served them.

They spent some time in custody.