Windows Azure – Authentication Failure Exception connecting to CRM Online

Jared Johnson, 16 January 2014

In testing of our new launched Tech Doc Generator, we encountered an issue connecting to our own CRM Online instance which has not yet been transitioned to Office 365. This only started to occur once it was deployed to Windows Azure.

When the application tried to connect to CRM it would return a System.ServiceModel.FaultException: Authentication Failure exception, even when correct credentials were supplied. Looking at the requests in Fiddler to login.live.com shows the error “User is in familiar location interrupt state“.

This error is caused by a security feature added to Windows Live by Microsoft, when an account is attempted to be accessed from a location greater than 300 miles from its regular location, a code is required to be entered from the users email or phone.

In order to satisfy this security requirement, after attempting to login the user needs to sign into their Windows Live account at https://account.live.com and click on the Recent Activity section.

They then need to find the Security challenge for their login attempt and click the “This was me” button, once this has been pressed login from the remote location will work correctly.