Did you overhear the guards in the guard room?
You need to go through the secret passage first.
Look through the chink in the wall.
One of the guards will mention something that he overheard.
He told you part of a password for the door.
Make sure you've seen a box in the vizier's room.
Did you notice the sheet of paper in his trinket box?