Microsoft has revealed the service outage which affected some of its apps and features on Tuesday was sparked by an attempted cyber attack.