@Varun Natraaj Thanks for reaching out and apologies for delay on this.
Let us know if following link helps you with your scenario
https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-nodejs-console
If you are still facing the problem, do let us know so that we can proceed accordingly.
-----------------------------------------------------------------------------------------------------------------
If the suggested response helped you resolve your issue, please do not forget to accept the response as Answer and "Up-Vote" for the answer that helped you for benefit of the community.