Troubleshooting errors during data collection in Microsoft 365 monitor (For versions upto v16300)

Troubleshooting errors during data collection in Microsoft 365 monitor (For versions upto v16300)

Prerequisites:
Ensure that you have met all the prerequisites for the Microsoft 365 monitor.
From Applications Manager version 16300 onwards, Microsoft 365 monitor will use Microsoft Graph API as the primary mode of data collection. 
We have migrated from PowerShell to Graph API as Microsoft 365 PowerShell commands were taking more time to execute for huge resources and needed Administrative user privileges to execute the commands. Microsoft provides only archived data in the Graph API. To monitor live data, use the PowerShell mode considering the user privileges and the time taken to fetch huge resources.
For REST API related common errors in Applications Manager from version 16310, refer this KB.

How to fix "PowerShell version 4 or above is required." error?

  1. Some of the cmdlets that Applications Manager uses for data collection are not supported for PowerShell versions below 4.
  2. For Eg., The "Test-NetConnection" cmdlet which is used for Endpoint connectivity checks is not available in older versions of PowerShell.
  3. Kindly upgrade to a higher version of Powershell to view the missing data.

How to fix "You have reached your maximum limit of concurrent PowerShell runspaces. Please wait for a few minutes and try again." error?

  1. An individual Office 365 administrator can have only three simultaneous connections to an Office 365 / Exchange Online / Sharepoint Online tenant.
  2. Idle sessions take 15 minutes to timeout. If you had hit "Poll Now" repeatedly, please wait for a few minutes for the PowerShell sessions to time out.

How to fix "Connecting to Microsoft 365 / Exchange Online / Sharepoint Online / Microsoft Teams failed." error?

Please do the following on the Applications Manager installed machine and send us the output to troubleshoot further:
  1. Open Powershell -> Run as Administrator.
  2. Navigate to the "Appmanager_home\working\conf\application\scripts\powershell" directory.
  3. Execute the below:
  4. .\Office365CheckConnectivity.ps1 'tenant-name' 'office365-useremail' 'office365password' 'Office365,ExchangeOnline,SharepointOnline,MicrosoftTeams'
    Eg. .\Office365CheckConnectivity.pd1 'apm' 'user@apm.onmicrosoft.com' 'P@$$WORD'
  5. Copy the full output to a text file and send us the file.

How to fix "Endpoints Connectivity in Microsoft 365 services - Exchange Online, SharePoint Online, Microsoft Teams" error?

Threshold for Endpoint Connectivity
  1. In the Endpoints Connectivity table, for the Endpoint with Status as False, we do not configure any threshold by default.
  2. If you require a threshold for the same, then go to Configure Alarms tab -> Choose Monitor Type as required (Microsoft 365 / Exchange Online / SharePoint Online / Microsoft Teams) and configure the alarm for the Office365Endpoints - Status attribute as Critical when contains False.
  3. Implement the same individually for each monitor type, if required.

Modify Endpoints or stop monitoring specific endpoints:
  1. The listed endpoints are some common ones and if you wish not to monitor any of those, then select the particular rows and choose the Disable option from the Action drop-down present at the bottom of the respective table in the UI.
  2. If needed, you can modify the Endpoints or URLs from the Office365Endpoints.ps1 script present in <Applications Manager Home>\working\conf\application\scripts\powershell directory. 
  3. If you wish to permanently stop monitoring any Endpoint or URL, comment the particular line in the Office365Endpoints.ps1 script using at the beginning of the line.
  4. Now poll the monitor to check the effect in the UI.

Endpoints with no value for Status:
  1. These might be actual URLs (the ones starting with https://) and we try to connect to those URLs to check the response code. 
  2. To check the same open PowerShell in admin mode and run the below command. For example, for https://www.office.com/ the command would be as below:
Invoke-WebRequest -Uri https://www.office.com/
  1. Check whether the response is received and there is StatusCode: 200 and StatusDescription: OK
  2. Check the same for all other URLs which are required to be verified.

How to fix "Error : Service health retrieval failed" error?

From Applications Manager v15520 & v15511, we have revamped Service Health Monitoring in Microsoft 365 monitors using Microsoft Graph APIs.
To troubleshoot the issue, follow the steps given below:
  1. Check whether all the prerequisites are met.
  2. Check if all the steps mentioned in the following link are implemented and the required permissions are provided: https://www.manageengine.com/products/applications_manager/help/prerequisites-for-applications-manager.html#Office365ServiceHealth
  3. Check if the TenantID, ClientID, and ClientSecret are correctly taken from the created app.
  4. Open admin PowerShell in the AppManager installed server and navigate to <Applications Manager Home>\working\conf\application\scripts\powershell directory.
  5. Execute the below command by replacing TenantIDClientID, and ClientSecret with that used in the Microsoft 365 monitor: 
    .\Office365ServiceHealth.ps1 'TenantID' 'ClientID' 'ClientSecret' 'MS365'
  6. The above script is to check the Service health in Microsoft 365 parent monitor. Similarly, execute the script mentioned below for individual services using its own keywords Exchange Online, Sharepoint Online and Microsoft Teams separately. 
    .\Office365ServiceHealth.ps1 'TenantID' 'ClientID' 'ClientSecret' 'Exchange Online'
  7. Copy the full output to a text file.

How to fix "Error : No output received from script execution (or) Exception occurred during data collection. Unable to collect data." error?

How to fix "Error : Unable to establish connection. Please check the connection and try again." error?

To resolve the error, check for the below cases and try polling the monitor again:
  1. Check if there is an active internet connection.
  2. Check if all the prerequisites are met.
  3. Execute the commands for the respective monitor type.
  4. Copy the full output to a text file and send us the file.

How to fix "No data / data missing for some counters in Microsoft 365 / Exchange Online/ Sharepoint Online/ Microsoft Teams" error?

Please do the following on the Applications Manager installed machine and send us the output to troubleshoot further:
  1. Open Powershell -> Run as Administrator
  2. Navigate to "Appmanager_home\working\conf\application\scripts\powershell" directory.
  3. Execute the commands for the respective monitor type.
  4. Copy the full output to a text file and send us the file.
Note :
To analyze time taken for the above scripts, run as the above scripts same like below command and share us screenshots of time taken, in addition to script output from above scripts.
Measure-Command {<Command> }
  1. Based on the time taken, increase the Polling interval and Timeout values for the particular monitor. When the polling interval is increased, the health and availability will be checked only at that particular time interval.
  2. Copy the full output to a text file and send us the file.

How to fix "Error : Timeout exceeded during script execution for Microsoft 365, Exchange Online, SharePoint Online, Microsoft Teams monitors" error?

Perform the following steps on the Applications Manager installed machine and send us the output to troubleshoot further:
  1. Open Powershell as administrator by right-clicking and selecting the 'Run as administrator' option.
  2. Navigate to <Applications Manager Home>\working\conf\application\scripts\powershell directory.
  3. Copy the full output to a text file and send the file to us.
To find the script execution time: 
To analyze the time taken for the above scripts, execute the above scripts as mentioned below once again, and share screenshots of time taken in addition to script output from the above scripts:
Measure-Command {<Command>}
  1. Based on the time taken, increase the Polling interval and Timeout values for the particular monitor. When the polling interval is increased, the health and availability will be checked only at that particular time interval.
  2. For Exchange Online monitor if huge data is found and takes a very long time, set the timeout value accordingly, and set custom polling interval by following the below steps:
    1. Go to Admin -> Performance Polling -> Optimize data collection
    2. Choose Monitor Type as Exchange Online.
    3. For both Top Mailboxes By Size and Inactive Mailbox Users metrics, choose the Collect data at customized time interval option.
    4. Set the value as 24 Hrs to fetch this data once a day and click Save.
If the issue still persists share the above outputs, screenshots of the above-mentioned page, monitor information page, edit monitor page, and the latest SIF for analysis.

Exchange Online errors

  1.  Refer to the steps given in this KB.

SharePoint Online errors

  1. Refer to the steps given in this KB.

Microsoft Teams errors

  1. Refer to the steps given in this KB.

Commands to execute for respective monitor type

For Microsoft 365 :
.\Office365Metrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
For Exchange Online :
.\ExchangeOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password' 'TopMailboxes,InactiveMailboxes'
 For Sharepoint Online :
.\SharepointOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
For Microsoft Teams :
.\MicrosoftTeamsPowershellMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
.\MicrosoftTeamsAPIMetrics.ps1 'TenantID' 'ClientID' 'ClientSecret'
For Service Health details :
.\Office365ServiceHealth.ps1 'TenantID' 'ClientID' 'ClientSecret' 'ServiceName'
Reach out to our support team with the text file containing the output to appmanager-support@manageengine.com along with the latest Support Information File (SIF) from Applications Manager with print all logs enabled for analysis.
  1. Enable print all logs, poll the monitor couple of times, wait for the polling to be completed and generate the SIF.



                New to ADManager Plus?

                  New to ADSelfService Plus?