Error "Could not load the "Azure Active Directory Module for Windows PowerShell"


Issue
When you execute one of the Office 365 Tasks you experience an error similar to the following

"Could not load the "Azure Active Directory Module for Windows PowerShell". Please ensure that this has been installed. The specified module 'MSOnline' was not loaded because no valid module file was found in any module directory."



Cause
This is caused when the requirements have not been installed on the server running XIA Automation Server.



Solution

Ensure that steps in the requirements section have been completed correctly and restart the Office 365 Task.