IDM Office 365 driver startup error "The type initializer for 'DXMLMSOnlineDriver.Schema.MSolSchema' threw an exception"

  • 7016270
  • 06-Mar-2015
  • 22-Nov-2016

Environment

NetIQ Identity Manager Driver - Office 365

Situation

When the driver starts, the remote loader throws an exception:

 <status level="error">
      <message>The type initializer for 'DXMLMSOnlineDriver.Schema.MSolSchema' threw an exception.</message>
      <exception-type>TypeInitializationException</exception-type>
      <stack-trace>   at DXMLMSOnlineDriver.Schema.MSolSchema.getSchemaDef(XmlDocument document)
   at DXMLMSOnlineDriver.SPDriverShim.getSchema(XmlDocument initParameters)</stack-trace>
    </status>

Resolution

This can happen if the Online Services Module for Windows Powershell is not installed.
Even if the latest Online Services Sign-in assistant is installed and works, the problem will happen without the Module.
Below is the link to the docs that explains the prerequisite.
You can also get to the information by going to the online documentation for IDM 4.5 Office 365 driver and going to the section 2.1 Prerequisites

Other Possible Resolutions:
- Make sure you have installed the correct Windows PowerShell module.  It should be Microsoft Windows PowerShell Version 4.0
- Make sure you have installed the  Windows Azure Active Directory Module for Windows PowerShell.  Look in Programs and Features for this installed module.
- Make sure you have copied all correct DLLs from the ..\MSOnline and ..\MSOnlineExtended directories to the .NET Remote Loader directory.
Microsoft.Azure.ActiveDirectory.Client.Framework.dll
Microsoft.Online.Administration.Automation.PSModule.dll
Microsoft.Online.Administration.Automation.PSModule.Resources.dll
Microsoft.Online.Identity.Federation.PowerShell.dll
Microsoft.Online.Identity.Federation.PowerShell.Strings.dll
Microsoft.Online.Administration.Automation.PSModule.Resources.resources.dll
Microsoft.Online.Identity.Federation.PowerShell.Strings.resources.dll
- If the above all checks out, in a PowerShell command prompt run:  get-executionpolicy  
It should return:  RemoteSigned
If it says: Restricted      Use the set-executionpolicy to change it to RemoteSigned and agree to the change. 
After the driver connects, you may be able to set the policy back to Restricted.

- Follow the troubleshooting steps found in the following section of the driver:
https://www.netiq.com/documentation/idm45drivers/office365/data/b954t11.html#b1f2p6nl
Specifically pay attention to item "1. PowerShell help is not up-to-date" and the first bullet point under the "To start the driver successfully, perform one of the following actions:" section.