Office 365 driver: Azure AD Module for Powershell logs fill up the disk

  • 7018758
  • 31-Mar-2017
  • 31-Mar-2017


NetIQ Identity Manager 4.5
NetIQ Identity Manager 4.6
NetIQ Identity Manager Driver - Office 365


The log file from the Azure Active Directory module for Powershell, a required module for the Office 365 driver, grows uncontrolled as a single file during the execution of the Office365 driver. A new file is created when the session is closed, but that only happens when the Remote Loader/driver is restarted.

The files are located at %localappdata%\Microsoft\Office365\Powershell (typically C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Office365\Powershell.)


The log files are created by the PowerShell MSOL cmdlets and are set at a very verbose level (INFO level). Unfortunately this trace level is not configurable, neither from the cmdlets themselves or by any environment setting. There is no log size restriction that can be imposed nor is there a mechanism to configure file rotation.

This limitation has been raised with Microsoft as an enhancement request. The following link provides additional information about the problem and allows you to vote for a solution to be implemented:

The suggested workaround to avoid the growth of these logs is to remove write permissions to the log folder. There is no functionality loss by doing so, other than the fact that these logs are not generated.