The Prophets - 21:28 He knows their past and their future. They do not intercede for anyone except those whom He pleases. Even they tremble in reverence before Him.
Allah knows the past and the future of the messengers:
The Table Spread/5:116 "Allah will say: "O Jesus son of Mary, did you say to the people, ´Take me and my mother as gods besides Allah´?"(Jesus) will reply: "You are great, it is not befitting me to say what I have no right to say. You would have known if I had said such a thing. You know what I think, but I do not know what you think. You know all mysteries."