"Not everyone who calls me "Lord, Lord" will enter the kingdom of Heaven, but only those who do the will of my heavenly Father. When that day comes, many will say to me, "Lord, Lord, did we not prophesy in your name, cast out devils in your name, and in your name perform many miracles?" Then I will tell them to their face, "I never knew you; out of my sight, you and your wicked ways!" Matthew 7: 21-23
I often see the above quote used in two ways, one more common than the other. The common way is often against those who point out the non-Christian behavior of vocally ardent believers, and simply because a person says the right belief structure, it doesn't mean that the person is saved. At some point in time, the person will have Jesus tell him or her that even though the person calls Jesus Lord, the person is not known by Jesus.
The less common way is against those who don't consider themselves Christian, and yet act a lot more "anointed-like" then those who do consider themselves Christian. Simply because a person acts nice or compassionate or merciful doesn't mean that Jesus knows that person, either.
On a whole, though, I find this a rather strange passage, given the list of criteria. You can prophecy, cast out devils, and perform miracles and yet still not enter the kingdom of Heaven. I'm not quite sure how "prophecy" is classified here. My understanding is that valid prophecies can only really come from God. Unless there's some sort of Bible verse that says evil people also deliver correct prophecies? That would just seem a little strange, because prophecies usually involve some sort of punishment occurring to sinful people, or a final strike against sin (such as the birth of Jesus), and why would an evil person, or evil entity, want to make a prophecy like that?
So if we go with the idea that prophecies can only come from God, wouldn't this be a way of identifying those truly following God?
The miracles idea is kind of iffy, just because both good and evil are granted certain abilities in the Bible. Granted, the idea behind everything is that even though evil has powers, good very much trumps evil in the end, and is more powerful. But if going with the idea that a miracle is a supernatural occurrence, then it can go either way in terms of what it proves.
The biggest one that's tripping me up is casting out devils in Jesus' name, especially when comparing that idea to Matthew 12: 22-28. I don't want to type it all out, but I do want to focus on the last part. Jesus has just cast out a devil, and the Pharisees say that Jesus is doing so by the power of Beelzebub. Jesus responds: "Every kingdom divided against itself goes to ruin; and no town, no household that is divided against itself cant stand. And if it is Satan who cats out Satan, Satan is divided against himself; how then can his kingdom stand? And if it is by Beelzebub that I cast out devils, by whom do your own people drive them out?"
I've always read the italicized part as Satan can't drive out devils, because then Satan is working against himself. The only way to truly drive out a devil is due to the power of God. And so if you are driving out a devil, you are doing so specifically according to the will of the Father. This would be one of the "markers" identifying who is truly following Jesus.
Yet the people in Matthew 7 use that as a marker, and Jesus says he never knew them. But how can that be possible, if the only way to drive out the devils is through the power of God? Then Jesus should know the people, because they are actively doing the will of God. Otherwise, why would God grant them the power to drive out the devils?
Right now, the only way I see around the Matthew 7 verse is that what the people did wasn't "valid." They didn't truly prophesy or drive out devils, they only thought they did. Except I think that's applying outside perspectives to the text, because based on the passage alone, the people sound sincere. Jesus doesn't say why he didn't know them (other than the implication that they didn't do the will of the Father. Except the will of the Father is what allows one to drive out devils in the first place, so ... yeah). He doesn't specify that they didn't really do what they claimed they did. I suppose the conclusion could be that the people were lying about what they did, since he called their ways wicked.
I also have difficulty reconciling the Matthew 7 verse to the following: "And these signs shall follow those that believe; In my name shall they cast out devils." Mark 16:17
Based on this, I'm supposed to specifically know those who believe by the fact that they drive out devils. And yet when that claim is used on Jesus, he says he doesn't know them, and their ways were wicked. Which again leads me to the fact that the people were lying