• Glen (Xapity)

SCSM Exchange Connector - Installing, Setup and Troubleshooting


SCSM Exchange Connector - Installing, Setup and how to Troubleshoot Errors We were setting up a test lab recently and needed the SCSM Exchange Connector to monitor the Notification Channel mailbox to work with our Xapity Mail tool. I just imported the Exchange Connector bundle and expected it to all work. Wrong! I am not sure what happened, but we seemed to hit every obstacle that we could. So I thought it would be useful to list some of the errors that can occur when installing and configuring the Service Manager Exchange Connector.

Updated November 2016 - Updated with new troubleshooting tips for SCSM 2016 and the Exchange Connector 3.1

Updated July 2017 - Updated with Office 365 configuration steps and extra Error message

Some of the basics and Prerequisites

  • When configuring the Exchange Connector use the Service Manager Workflow account or it will never run. Remember the Workflow account needs to be have the 'SCSM Administrators' role

  • There needs to be a connection to a SMTP server. Confirm this is working first. Use telnet client to connect to the SMTP server on port 25 and send a test email:

  • Confirm that you allow anonymous connections from the Service Manager Workflow server to Microsoft Exchange. Or use Windows Integrated Authentication.

  • This one did catch me out and had me scratching my head for a while. UAC needs to be disabled or you need to run the console in Administrator mode to configure the connector.

  • The Service Manager Workflow account email address used on the Notification Channel. It is easier and less prone to error if this is the case. Otherwise make sure the Workflow account has full permissions to the email address used.

Logging

It seems obvious, but check the Event Viewer logs on the Workflow server. I know I am guilty of not doing this at times. There is usually some indication that something went wrong.

Service Manager shows its roots by logging to the OpsMgr log in Event Viewer.

To turn on more verbose logging of the Exchange connector, create the following registry keys:

Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Create Key: System Center Service Manager Exchange Connector Crate String: EnableEWSTracing Type: String Value Data: 1

Create String: LoggingLevel Type: String Data: 7

You can also manually create the EWS URL if autodiscover does not work. Create String: ExchangeURL Type: String Data: ExchangeEWSURL

Confirm the Exchange Connector Install steps all completed correctly: 1. Install the Exchange Web Services API Make sure that you have the correct version of the Exchange Web Service API. Download the Exchange Web Services dll 1.2.1 https://www.microsoft.com/en-au/download/details.aspx?id=30141 Run EwsManagedApi.msi to extract the files. Copy the Exchange Web Services dll Microsoft.Exchange.WebServices.dll into the Service Manager directory on the Workflow server. The default location is C:\Program Files\Microsoft System Center 2012 R2\Service Manager. 2. Give Permissions to the Workflow account in Exchange Run the following command from the Exchange server using Exchange PowerShell. It gives the Service Manager workflow account permissions to all Exchange mailboxes: New-ManagementRoleAssignment -Name:AdminImpersonateAll -Role:ApplicationImpersonation -User ServiceManagerWorkflowAccount 3. Import the Connector Management Pack Bundle When importing the Management Pack bundle, ServiceManager.ExchangeConnector.mpb, you should see two management packs to import:

  • Microsoft.SystemCenter.ServiceManager.ChangeRequestActionLog

  • Service Manager Exchange Connector


Exchange Connector Autodiscover

The easiest way to configure the Exchange Connector is to use the Exchange Autodiscover service. This works by sending a request to discover the Exchange Server connection settings.

To verify the auto configuration URL you can open the Exchange PowerShell command and enter:

Get-ClientAccessServer | Select *auto*

Example Output: [PS] C:\Windows\system32>Get-ClientAccessServer | Select *auto* AutoDiscoverServiceCN : EX01 AutoDiscoverServiceClassName : ms-Exchange-AutoDiscover-Service AutoDiscoverServiceInternalUri : https://ex01.xapity.lab/Autodiscover/Autodiscover.xml AutoDiscoverServiceGuid : 77378f46-2c66-4aa9-a6a6-3e7a48b19596 AutoDiscoverSiteScope : {Default-First-Site-Name}

The AutoDiscoverServiceInternalUri value gives the connection URL: https://ex01.xapity.lab/Autodiscover/Autodiscover.xml This can also be set manually in the configuration settings when creating a connector. And can be set via the registry key in the logging section above.

SCSM 2016 and the Exchange Connector 3.1

Release Notes for System Center 2016 Create Exchange Connector Wizard might crash (fixed in SCSM 2016 UR 2 and above) Description: Creating a new Exchange Connector via Service Manager 2016 console throws an exception if the admin clicks on the "Test Connection" button in the "Server Connection" pane of "Create Exchange Connector" wizard. Workaround: Fixed in SCSM 2016 UR 2 and above. Or to work around this issue, avoid clicking "Test Connection" button in the "Create Exchange Connector" wizard. Instead, directly click the "Next" button, which internally tests the connection and does not crash the wizard.

Office 365 and the Exchange Connector

To use an Office 365 mailbox with the Exchange Connector is supported. The steps to configure the Exchange Connector are the same, but some are not obvious and Error 8 below will appear.

The important steps to configure Office 365 are:



  1. Use an Office 365 full user mailbox - a regular user, not a shared mailbox (which will have a disabled user account)

  2. In a lot of cases SCSM and Office 365 will be in different domains with no AD sync. This is the case in this example.

  3. For the Active Directory Forrest use the Office 365 domain

  1. Use the Exchange URL: https://outlook.office365.com/EWS/Exchange.asmx

  1. Use a new Run As Account.

  1. User name: the email address of Office 365 Mailbox. The domain information will have the local AD domain. This is OK as the email address will be used to logon to Office 365 (like a UPN logon where you do specify the domain).

  2. Accept the Warning Error (see Error 8 below) about the Run As account not being validated. This is expected when there is no trust between Office 365 and the local domain.

  1. Test the connection to see that the details are correct

  2. Then continue the wizard as normal.

Exchange Connector Error Messages

Error 1: Account does not have Impersonate permission in Exchange

Potential Solution: Confirm that you are using the Service Manger Workflow account and that it has the Impersonate permission in Exchange.

Error Message: T"he connection to the server was unsuccessful. Please check the server name and/or credentials entered. Additional Information: The user defined by the Run As account does not have permission to impersonate the email address Accountname. (Message=The Account does not have permission to impersonate the requested user.)"


Error 2: Password for Service Account Incorrect Potential solution: The password entered was incorrect. Confirm the password and try again. Error Message: "The connection to the server was unsuccessful. Please check the server name and/or credentials used. Additional Information: The request to autodiscover the exchange server URL did not return a valid response. Please try again later or specify the URL manually. (Message: The Autodiscover service couldn’t be located.)"


Error 3: Incorrect Email Address Potential solution: Check to see that the email address is correct. It has to be the primary email address and not a secondary email address on the account. Error Message: "The connection to the server was unsuccessful. Please check the server name and/or credentials entered.

Additional Information: Unable to validate credentials, please refer the event logs for more information (Error Type: AutoDiscoverRemoteException, Message=The Autodiscover service returned an error.)"


Error 4: Missing the Exchange Web Services API If the Exchange Web Services dll is missing the following error will appear.


Error Message: Message: A required resource could not be found. "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SystemCenter.ExchangeConnector' or one of its dependencies. The system cannot find the file specified." Potential solution: Make sure that you have the correct version of the Exchange Web Service API. Download the Exchange Web Services dll 1.2.1 https://www.microsoft.com/en-au/download/details.aspx?id=30141 .

Run EwsManagedApi.msi to extract the files. Copy the Exchange Web Services dll Microsoft.Exchange.WebServices.dll into the Service Manager directory on the Workflow server.

Error 5: SCSM 2016 Incorrect Email Address

Error Message: Could Not Load Type…

Message: Could not load type 'Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Administration' from assembly 'Microsoft.EnterpriseManagement.ServiceManager.UI.Administration


Potential solution: The email address used under Use Impersonation does not match the primary email address on that mailbox.

Or if you are using Office 365 without impersonation - using the run as account to connect to its own mailbox, then leave the Use Impersonation details blank, otherwise you will get this error.

Error 6: Not Running as Administrator

Error Message: T"he Connection to the server was unsuccessful. Please check the server name and/or credentials entered. Additional Information: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security"


Potential solution: Try opening the SCSM console with "Run As Administrator" or change UAC settings to low.

Error 7: Wrong Exchange Web Services DLL

Error Message: T""e connection to the server was unsuccessful. Please check the server name and/or credentials entered. Additional Information: Unable to validate credentials, please refer to the event logs for more information (Error Type=MissingMethodException, Message=Method not found: 'Microsoft.Exchange.WebServices.Data.FindItemsResults'1<Microsoft.Exchange.WebServices.Data.Item>"


Potential solution: There are two versions of the Exchange Web Services DLL - v1.2 and v2.2. SCSM 2012 prefers version 1.2.

Download Links:

Exchange Web Services v1.2: https://www.microsoft.com/en-au/download/details.aspx?id=28952

Exchange Web Services v2.2: https://www.microsoft.com/en-us/download/details.aspx?id=42951

Error 8: Office 365 or untrusted domain Run As Account

Error Message: "The Run As account cannot be validated. This may be because the domain controller is unavailable or the account provided in not in a trusted domain.

If the account is not in a trusted domain, you can click Yes to continue and ignore this warning.

Do you want to use this account even though it cannot be validated?"


Potential solution: This is just a warning message and is expected if you are using Office 365 or a Run As account in another untrusted domain. Click yes to continue.


Xapity Mail

Is an advanced email editor for Microsoft System Center Service Manager that allows Analysts to send emails directly from the SCSM console, utilise SCSM Email Templates and have details populated automatically from the Work Item. Xapity Mail is standalone tool, or integrates with Xapity Teams for per Support Group administration options. Find out more

Watch Xapity Mail in Action



Xapity - Innovative Software for SCSM - Discover our Products

#SCSM #ExchangeConnector #Tips #Mail #Email

9,960 views1 comment

© 2020 Xapity PTY LTD ABN: 81 611 883 482

  • White RSS Icon
  • White YouTube Icon
  • White Vimeo Icon
  • Facebook Clean
  • Twitter Clean