I want to login VSTS through code in ax 2012. Its possible or not , if its possible how we can achieve that.
Yes, it is possible - simply use the .NET API for VSTS via .NET Interop.
By the way, can you please change the title to match your actual question?
Thanks for reply Martin