Please see the issue description at URL :
https://stackoverflow.com/questions/44787033/angular-4-context-lost-after-authentication
I think Angular context is being reset as redirecting to Azure AD login page is causing browser to refresh and going to Azure AD to fetch token.