Add a reference of the Microsoft.Online.Administration.Automation.PSModule dll to your Project in Visual Studio

First of all make sure that all the required items are already installed on your machine. You can view the requirements here, The Microsoft.Online.Administration.Automation.PSModule dll is required to execute the

command and get the return values in the form of type, Microsoft.Online.Administration.User from within the .net C# code. Well, it’s supposed to be a simple job of adding a reference of this dll to your project. The problem is to identify the location of this dll.

Initially, I did some googling to download the dll. However, I couldn’t find any trusted source (Microsoft) from where I can download this dll. Then, I realized that this dll should have been downloaded with the installation of Windows Azure Active Directory Module. Hence, I navigated to that location I found the dll at the following location


Unfortunately, the job’s not done yet. A strange thing started happening here. Though, I can view this dll in my Explorer. The folder, MSOnline was inaccessible from the Visual Studio Add Reference window!

Still, I am not aware of this weird behavior. What I did to resolve this issue is, I copied the entire MSOnline folder to the bin directory of the project and from there I was able to add the dll’s reference to the project.