As more companies use Office365 it’s important to monitor the health. Even though you often cannot fix it yourself, you can inform your employees so they don’t waste time by thinking it’s some other problem. These script based DataSources use Microsoft’s APIs (shown here). It’s complicated to set up Microsoft API authentication and add all the necessary properties so I’ve built a helper script (with GUI) to help you set this up.

Here’s the info monitored:

Exchange mailbox stats:  Quantities of Total mailboxes, Active mailboxes, mailboxes that are ‘send prohibited’, mailboxes that are ‘send & receive prohibited’, and mailboxes that have a ‘warning limit’.

Exchange email clients:  Quantities of Outlook for Windows, Outlook for Mac, Mac Mail, Mobile, Web, SMTP, IMAP, POP3

Exchange email stats: Total messages sent, received, and read. Also, quantities of users that have sent, received, and read.

Office365:  Shows one of 6 statuses of each service in your subscription including Exchange, SharePoint, Skype, Teams, OneDrive, and 9 more.

Exchange Online spam users: Quantity of spam users as determined by Microsoft. These users are blocked from using email. This DataSource doesn’t get installed by the helper script but you can manually import it and set credentials.


  1. Create an API user and get the API ID and key (see video below).  When you create your API user, set the Role permissions as follows:
    Under the ‘Resources’ section, set Devices by Type > Collectors = Manage (or whatever folder you have your collector – i.e. the device you want the DataSources applied to)
    Under the ‘Settings’ section, set ‘LogicModules’ = ‘Manage’. This is needed to import the DataSource files.
  2. Download the files (the PowerShell script and DataSource XML files) to your local drive.
  3. Start the PowerShell script (right click on file and click ‘run with PowerShell’) and follow the prompts as shown in video.
  4. Be sure to test by using ‘Poll now’ on the ‘Raw Data’ tab.


  • You must have admin level access to your Microsoft Office365 account.
  • You must run this helper utility from a Windows computer (because it’s a PowerShell script)
  • You must have the PowerShell AzureAD module installed (the helper utility will help with this – be patient it may take ~20 seconds). PowerShell AzureAD module is Microsoft’s recommended way to automate tasks in Office365.


Official tech support is not provided by LogicMonitor but I will try to help as time permits.

Demo video below:

Setup video below:


Video showing how to create an API user: