If these many people were trusting in Jesus Christ as the ALL-sufficient means of their salvation and not in their works, then Christ would not be condemning them. Works of ministry done with the right motivation are works of obedience. Setting out to obtain salvation by works is not works of obedience and is also not the will of the Father.What osas misses in the passage is it's works of ministry that they trusted in, not works of obedience. But osas insists the passage is saying it's talking about people who trust in their works of obedience. But Jesus said they do not have those works for that to somehow be the argument he is making. If they had works of obedience instead of being lawless evil doers, Christ would not be condemning them.
John 6:40 - For my Father’s will is that everyone who looks to the Son and believes in Him shall have eternal life, and I will raise them up at the last day.
John 17:3 - And this is eternal life, that they may know You, the only true God, and Jesus Christ whom You have sent. The term "know" implies intimate, experiential knowledge, through a relationship with Him, not merely theoretical knowledge. These many people were not true converts. This is why Jesus referred to these many people as "workers of iniquity." God does not see the righteousness of God through faith in Jesus (Romans 4:5-6; Philippians 3:9) in unbelievers, but He see's all of their sins which remain and have not been washed away by the blood of Christ

