One needs to remember that, the distinction between astribing intrinsic (dhati) knowledge to the Prophet is shirk while granted (ata’i) knowledge is not, is foolish. The response should be immediately whether the attribute “creating” (takhliq) of Allah when granted to anyone of the creation is not shirk either? Can it still not be deemed as shirk when a person believes someone is granted this attribute of creating and create worlds, humans, animals and whatever he wants?
Likewise, Ahmad Raza Khan and his followers attribued the attribute of knowledge of Allah, to the creation. He came with an opinion that nobody from the Salaf ever held. No reliable scholar ever stated such what he and his Barelwi followers stated in his books.
Ahmad Raza Khan Barelwi states in his book Anba al-Mustafa about the knowledge of the Prophet (sallallahu alayhi wa sallam):
“It is without a doubt that the Almighty has given His Noble Beloved (Allah bless him and grant him peace) the complete knowledge of everything from the first till the last. From the east to the west, from the Throne till the earth, everything was shown to him. He was made witness to the Kingdom of the heavens and the earth. From the very first day till the last day all of the knowledge of what was and what shall be (ma kana wa ma yakun) has been shown to him. From all of the above, not even an iota is outside the knowledge of the Prophet. Great knowledge has been encompassed by the Noble Beloved (Allah bless him and grant him peace). It is not just of a summary type but what is small and big, every leaf that falls and every grain in the darkness of the earth are in their entirety known to him individually and in detail. Much praise to Allah. In fact, that which has been discussed is not, never, the complete knowledge of the Messenger of Allah (Allah bless him and grant him peace and send peace on his family and companions, all of them); but this is a small part of the Prophet’s knowledge …” (Anba al-Mustafa, p.486)