The primary duty of man is to keep the commandments of God. In the commandments, the will of God is revealed to us. To follow the will of God is to obey the commandments of God. The commandments of God are not grievous. The commandments of God are the will of God. The will of God is what God wants us to do. When we do what the commandments are telling us to do, that is when we are doing what is the will of God. No man can please God if he does not obey the commandments of God. It is when we obey the commandments of God that we can be seen in the will of God.
The purpose of God is not the purpose of man. Our purpose cannot be the purpose of God. We are dominated by the flesh. We are ruled by the flesh. The flesh makes us to go against the will of God. No man can please God while walking in the flesh. Our carnal pleasures and fleshly lust do not satisfy the purpose of God. Our inordinate craving for material things can't make us to do the will of God. The flesh is an enemy to the purpose of God.
Following the will of God can be achieved by studying the Word of God. We are not going to find the will of God outside the Word of God. We know that it is in the Bible that we get to know about the word of God. So, studying the Word of God regularly can lead us into the purpose of God.