Hi @Thanh Binh Nguyen ,
If i understand your need correctly, you want to use AzureAD authentication in pure javascript and don't use .Net code.
If possible, I'd like to change your mind about that. Use javascript to launch front call to external API can be dangerous for your security. You need to protect call to external website explicitly, and a lot of information are available to public.
If you use a controller, it will be more simple to you, because .Net code for connect to Azure AD are easy to find. And you improve your application security.
I hope it will help.