It is narrated from Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) that he married his daughter to al-Hajjaj bin Yusuf, and said to her: "When he comes to you, say these words:" "There is none worthy of worship except Allah, the Most Forbearing, the Most Generous; glory be to Allah, the Lord of the Mighty Throne; all praise is for Allah, the Lord of the worlds." And he related that whenever a distressing matter befell the Messenger of Allah (peace and blessings be upon him), he would say these very words.
Hammad (may Allah have mercy on him) said: "I think he also said: (So al-Hajjaj could not reach her)."
Related hadith on this topic