They did all these things. Jesus doesn't say, "... they think they prophesied ... pretended to cast out devils ... did many so-called wonderful works ..." He says they actually did these things. Did they have the Holy Spirit? If so, can you have the Holy Spirit and have Jesus profess "I never knew you?" If they didn't have the Holy Spirit, how did they do all these things? How could they do these things in his name?

Matthew 7:21-23