#41 - Port MicrosoftAccount middleware from Katana.