All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Al-‘Ajlooni mentioned this Hadeeth (narration) with the wording: "I was a hidden treasure, then I wanted to be known, so I created a creation to whom I made Myself known, and knew Me."
In another narration, He Says: "…I made Myself known to them, so they knew Me through Myself." Al-‘Ajlooni said that what is commonly repeated on people's tongues is: "I was a hidden treasure, then I wanted to be known, so I created a creation, so they knew Me through Myself." This is often quoted in the Sufis' words although it is a Mawdhoo‘ (fabricated) Hadeeth falsely attributed to the Prophet, sallallaahu ‘alayhi wa sallam. Al-‘Ajlooni stated that Ibn Taymiyyah said, "This neither belongs to the words of the Prophet, sallallaahu ‘alayhi wa sallam, nor was it reported through an authentic or weak chain of narrators.” Az-Zarkashi, Al-Haafith ibn Hajar, As-Suyooti, and other scholars agreed upon that.
Allaah Knows best.