Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Comments
Bug fixes + an amazing new feature = v1.8 and v2.2 of the SMLets Exchange Connector out now!
Predict Configuration Items: Last year Azure Machine Learning was brought into the connector to predict Work Item Type (IR/SR), Support Group, and Classification of a New Work Item. So it only makes sense to follow through and now predict the Impacted Config Item the email is about. This extends the original AML Experiments as it once again is built around you, your organization, and your data. That means regardless if you're using:
The connector can automatically relate the Impacted Config Item on New Incidents or Service Requests. Just like before, all you need to get started is a CSV of Work Items and their Affected Config Items. And of course - the Github wiki has a detailed walk-through alongside all the SQL queries you need to get started. Spare your Analysts the paperwork, improve your reporting and realize Service Manager's true CMDB potential with Machine Learning today!
A few long standing bugs were addressed in this release as well a few around default Multi-Mailbox functionality (thanks @Ryan_Kennedy1!), visual only bugs when Multi-Mailbox isn't used, and edge cases with the Merge Replies functionality.
Lastly -
It is the most advanced email connector your service desk has ever worked alongside. SMLets Exchange Connector v1.9 and v2.3 are out today!
Azure Vision: Images attached to emails can now be optionally processed by Azure Vision Services in order to first describe them and assuming text is detected - Optical Character Recognition (OCR) to be used to extract text from them. Now you can turn screenshots of error message into searchable text!
Azure Speech: *.wav or *.ogg files attached to emails can now be optionally processed by Azure Speech Services to transcribe audio to text. Whether it be voicemails or recordings, audio files in Service Manager can be searched!
Best of all these new data points are stored inside your Service Manager deployment for use in any number of PowerShell automation and reporting scenarios you can come up with.
And of course to wrap things up - a few note worthy items:
@Adam_Dzyacky d, one could post a long wall of text, but sometimes an image is worth more than countless words.
(While I don't see us implementing Azure Machine learning stuff anywhere in the near future, the features just sound awesome on paper, so I'm sure it's a real blast in reality! 😊)
Sorry to say @Adam_Dzyacky but it does not belong in community uploads any longer 🤣🤣🤣
Psssst. SMLets Exchange Connector v2.4 is out!
OAuth 2.0 for Exchange Online: If you've been following the Exchange Team's announcements over the last year or so. Basic Authentication's retirement date for Exchange Online has been a bit fluid. Whichever the case - it put the connector in need of newer authentication schemes to ensure those running their mailboxes in 365 continued to function without a hiccup. The functionality is here and with a fully detailed walkthrough on the wiki on how to configure.
In order to achieve OAuth 2.0 support, the Exchange Web Services DLL now requires the latest version of v2.2 compared to the previous v1.2.
This release also addressed a tiny visual issue wherein toggling the Use Autodiscover checkbox had no impact on your ability to actually edit the Autodiscover URL textbox.
@Adam_Dzyacky in the instructions on https://github.com/AdhocAdam/smletsexchangeconnector/wiki/Configuration-Examples#scenario-3-exchange-onlineoffice-365-with-oauth you mention at the Task Scheduler that we should be using the Microsoft Secrets Management module to store the credentials. To register the password I should run a powershell command as the account running the task. In my specific case, we run the task with the workflow account, but access the mailbox with another account. The credentials for the mailbox is specified in the script. Can I go ahead with the same setup as before or do I need to do anything different in order to get version 2.4.0 to work properly?
So the idea with Secrets Management @Joakim_Normann is that it helps you avoid storing credentials in plain text and instead securely with the credential vault built into Windows.
So if your Workflow Account is running the script but a different user is a connecting to Exchange in the script - the Workflow Account needs to store those credentials in its cred vault so it can retrieve them when the script runs. Secrets Management (last I checked) stores vaults per user. I mention this only because if you were to store the credentials as your user, the workflow account would have no way to access them. So as far if you need to do anything differently, if you scroll to the bottom of that walkthrough there is a screenshot that highlights how to use in SMA/Azure Automation. These are the same variables you'd update in the script so Task Scheduler and Workflow account could pull the credentials.
BUT... I should add that Secrets Management is more of a bridge solution to v3.0 of the connector which is currently in its second beta. The new version allows you to securely work with Run as Accounts, the scsm workflow engine, get detailed logging, and do away with Task Scheduler & Secrets Management. The only currently known issue is lack of impersonation support in Exchange.
I successfully ran Install-Module -Name "PowerShellGet" -Force and Update-Module -Name "PowerShellGet", but when I tried to run install-module Microsoft.PowerShell.SecretsManagement -AllowPrerelease as suggested in the instructions, I get the message "PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Microsoft.PowerShell.SecretsManagement'."
The message you receive signals that you're unable to talk to the PowerShell Gallery. If you run:
Get-PSRepository
Do you get any results? If you do not receive any results it means that somewhere along the way, PowerShell lost the config to connect to PSGallery. You can re-register that connection with:
Register-PSRepository -Default
It's time for the next major release with the debut of SMLets Exchange Connector v3.0!
Workflows: It's now possible to bring the connector fully under the control of Service Manager's Workflow Engine. With this new version, you can now define the location of where the connector is stored and how often it runs directly from the Admin Settings. All the while, still providing the ability to freely edit and customize the connector at your discretion! Which means you can now use...
Run as Accounts: If you move to Workflow based control, just like any out of box connector you can now select which Run as Account you want to use to authenticate to Exchange and the Cireson SCSM portal. Which means no more Task Scheduler, no more Secrets Management module and no more micro-managing credentials.
Logging: Regardless of your deployment strategy you can now obtain detailed logging through SMA/Azure Automation or directly through the Windows Event Log. How you ask? With the introduction of the New-SMExcoEvent function. Which means apart from all of the logging that comes out of the box now with v3.0, you can also now insert logging wherever you want. Got an idea for custom logging that you think should be out of the box with the connector? Submit a pull request against the repo and become a contributor today! Don't know where to start? As always, the wiki has you covered.
Providing workflow support in the connector has been a goal of mine for awhile now. But it was monumentally important to me to hold firm on a founding tenant of this project - Administrators must be able to continue to customize the connector at whim. So whether you're coming from the stock connector or just looking to upgrade. You can do it faster than ever before and still continue to fully customize the solution to your organization's needs.
@Adam_Dzyacky I installed v3.0 but after I made some changes to the settings in the GUI I get the following error when trying to open settings for the Exchange Connector.
Date: 2020-12-01 09:29:02
Application: System Center Service Manager
Application Version: 10.19.1035.0
Severity: Error
Message: Conversion overflows.
System.OverflowException: Conversion overflows.
at Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler.DoTask(IList`1 navigationNodes, NavigationModelNodeTask task, List`1 parameterList)
at Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler.DoTask(IList`1 navigationNodes, NavigationModelNodeTask task)
at Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)
Do you know what I can do in order to resolve it?
It's hard to say @Joakim_Normann without more context. Do you know what you were changing as I/others would need steps to be able to reproduce this.
@Adam_Dzyacky All I can recall that I did before it stopped working was that I disabled the workflow and had to set an attachment size before I was able to save the settings and close the GUI. After that I haven't been able to open the GUI and get the above error message. We restored the server to the day before I imported the MP for version 3.0, but I still receive the error.
Error in Operations Manager log:
An exception was thrown while processing GetManagedEntityByManagedEntityIdsWithInstanceQueryOptions for session ID uuid:2c2076a7-a4a9-4bd6-8e5b-6771c972a024;id=10.
Exception message: Conversion overflows.
Full Exception: System.OverflowException: Conversion overflows.
at System.Data.SqlClient.SqlBuffer.get_Decimal()
at System.Data.SqlClient.SqlBuffer.get_Value()
at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(ExecuteArguments executeArguments, QueryResults& queryResults)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.Execute[T](ExecuteArguments executeArguments, RetryPolicy retryPolicy, GenericExecute`1 genericExecute)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(SqlCommand sqlCommand, IList`1 prologEpilogList, IList`1 projection, QueryDefinition queryDefinition, RetryPolicy retryPolicy)
at Microsoft.EnterpriseManagement.DataAccessLayer.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureHelper.GetFullObjectsFromManagedEntityGenericViewResultSet(ResultSet resultSet, DatabaseConnection databaseConnection, GetMomTypeSelectQueryDefinitionName getMomTypeSelectQueryDefinitionName, InstanceQueryOptions instanceQueryOptions)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureHelper.ExecuteQueryForManagedEntity(QueryDefinition queryDefinition, String criteriaXml, Pair`2[] parametersAndValues, ColumnDefinition inClauseColumnDefinition, ICollection`1 inClauseElements, InstanceQueryOptions instanceQueryOptions, GetMomTypeSelectQueryDefinitionName getMomTypeSelectQueryDefinitionName, IList`1 columnsToRetrieveForBufferedMode, DatabaseConnection databaseConnection, Boolean& resultSetLarge)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation.ExecuteQueryForManagedEntity(QueryDefinition queryDefinition, String criteriaXml, Pair`2[] parametersAndValues, ColumnDefinition inClauseColumnDefinition, ICollection`1 inClauseElements, InstanceQueryOptions instanceQueryOptions, GetMomTypeSelectQueryDefinitionName getMomTypeSelectQueryDefinitionName, IList`1 columnsToRetrieveForBufferedMode)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation.ExecuteQueryForManagedEntity(String queryDefinitionName, String criteriaXml, Pair`2[] parametersAndValues, String inClauseColumnName, ICollection`1 inClauseElements, InstanceQueryOptions instanceQueryOptions)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation.ExecuteQueryForManagedEntityByManagedEntityIdList(ICollection`1 managedEntities, InstanceQueryOptions instanceQueryOptions)
at Microsoft.EnterpriseManagement.ServiceDataLayer.EntityObjectsService.GetManagedEntityByManagedEntityIdsWithInstanceQueryOptions(IList`1 managedEntityIds, String languageCode, InstanceQueryOptions instanceQueryOptions)
I think the quickest way to recover here unfortunately @Joakim_Normann is to just drop the MP, re-import it, and re-define settings paying close attention to what you are changing. I won't refute the possibility of an issue with one of the values, but it's going to be hard to pinpoint down which one.
Alternatively, another option (which is going to be highly prone to guess work on your part) is nulling values out of settings. Since you said the File Attachment size was the last thing you changed, you could start there and see if it resolves. As an example, here's the PowerShell to achieve that:
Alternatively, to see a list of all of the values and their property names you can just run this:
Just a heads up @Joakim_Normann, I was doing some testing this past weekend for another issue and I believe I've managed to replicate the very error you cite. I've raised the Issue here and am currently working towards resolution with the following Pull Request.
It's time for the last release of the year with SMLets Exchange Connector v3.1!
Digital Signature Enhancements: Emails that are digitally signed with a bad cert (invalid, expired, etc.) can optionally be ignored for processing by the connector. Apart from logging these events, you can also optionally trigger the Invoke-InvalidDigitalSignatureAction function any time this event occurs through Custom Events. Go ahead and call custom Templates! Custom PowerShell! Speaking of PowerShell...
[pwsh] keyword: There is a new keyword in town and it enables you to introduce your very own processing routine to the connector that is maintained throughout upgrades. Invoke Rest APIs, Webhooks, or even PowerShell directly from email. But fret not my security conscious friends, the only way to wield the shell from email is with 100% verifiable digital signatures in addition to the new Invoke-ValidDigitalSignatureAction Custom Event that you define. Now you can kick off any action in your environment because you know with utmost certainty who it came from. Looking for inspiration? Check out the wiki over here.
This release also made some logging enhancements for MimeKit as well as addressed a long standing issue on the inability to parse emails that were digitally signed and encrypted. It also resolves issues when using the connector in non-US based regions as it pertains to decimal delimiters and decimal precision. Those running the connector outside of the US are advised to upgrade to prevent any disruption in functionality. My thanks to @Joakim_Normann and @Alexander_Axberg for raising these issues!
New year. More connector. It's SMLets Exchange Connector v3.2!
Don't Move Processed Mail: Similar to the out of box connector, you can now choose whether or not mail is moved to the Deleted Items folder or not upon processing. Which as a result could now lead to some interesting Custom Event scenarios. 😁
GitHub Actions, Status, and Security: The connector now compiles directly on GitHub infrastructure. This brings with it a few benefits:
Documentation: The Wiki has also been updated to show how to setup Multi-Mailbox configuration with Exchange Server Mail Flow Rules. Which means setup and administration is easier than ever!
This release also addresses a few bugs as they relate to Multi-Mailbox processing, file encoding, issues with opening attached emails in the console, and typos seen in the UI. All reported and righted from the help of community members @Nathan_Bates, @Jan_Schulz , @Peter_Miklian , and @Alexander_Axberg on the GitHub repo. I could not have done this release without each of you. Thank you for your keen eyes and contributions across code and documentation!
@Adam_Dzyacky I have imported the MP for the latest version of the Connector and updated the folder with the new files. However when I have entered values in the required fields in Settings I get the following error when pressing OK when trying to save the settings:
Date: 2021-04-09 13:25:58
Application: SMLets Exchange Connector Settings v3.2.0.18
Application Version: 10.19.1035.0
Severity: Error
Message: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at SMLetsExchangeConnectorSettingsUI.AdminSettingWizardData.AcceptChanges(WizardMode wizardMode)
at Microsoft.EnterpriseManagement.UI.WpfWizardFramework.PropertySheetDialogBase.bgw_DoAcceptWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at Microsoft.EnterpriseManagement.ConsoleFramework.BackgroundWorkerWithCulture.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
I have tested to remove the MP and re-import it, but I still get the same error. Have I missed something?
@Joakim_Normann Can you make sure that on General/Cireson pages that the Run As Account has been set to a valid account (i.e. not bad username or password)?
Stop. Collaborate and Download....would have been a great intro to the previous release. But that's not important right now. SMLets Exchange Connector v3.3 is out!
History: The 100+ settings you can change in the connector's Settings UI is extensive. Whether you're looking to compare recent Azure Machine Learning numbers or just looking for a history of changes you and your fellow Admins are making. Just like Work Items and Config Items, this new tab let's you view it!
Logging: It wouldn't be another release if opportunities didn't continue to expand in this space. Get even more detail and more insight into runs of the connector as it pertains to retrieving OAuth Tokens from 365, Parent Work Items when updating Activities, detected email language from Azure, identifying the members of a Support Group, and the volume of work assigned to an individual when using dynamic analyst assignment.
Dependencies and Security on GitHub: Mimekit has long been a dependency for the connector if you've been using signed and/or encrypted messaging. But now it's been declared as a formal dependency in the repo so as to open up new automation opportunities specific to GitHub. Plus the autonomous weekly security scans of the connector now render their status directly on the readme/front page of the repo so you're always in the know of the project's status.
This release also addresses an issue as it pertains to a Merge Reply scenario (multiple RE: patterns) and File Attachment handling. Both issues that are slightly more pronounced if you're using SCSM Workflows to run the connector.
I don't normally announce super minor releases, but when I do it's because new logging, error handling, and performance enhancements have arrived with SMLets Exchange Connector v3.3.1!
This release also addresses a few issues specific to using SCSM Workflows (v3.x+) wherein not creating Users in the CMDB prevents the Affected User or Comment from being left correctly. A message with an empty body causes Add-ActionLogEntry to throw an error. And lastly, regardless of how you choose to run the connector - Azure Machine Learning could predict an enum/config item that was deleted since the last round of training occurred.
Hi Guys, @Adam_Dzyacky, do you have a How-To setup this on Service Manager (where to place the files, PS..., )
Would you be able to tell me if it will work with Cireson Community Edition of the portal? Even if it just processes emails and creates incidents would do.
Many thanks
Give this a try: https://github.com/AdhocAdam/smletsexchangeconnector/wiki/Configuration-Examples
Thanks @Nick_Flint. I can see that the MP in the downloaded folder sais 2016. Do you know if it will work on Service Manager 2012 R2?
PS: i dowloaded the version 2.2 of the script and all it's components.
Hey there Vik,
Good to know @Adam_Dzyacky, anywhere to find the MP for 2012+ or it doesn't use one? I can't find it in any of the versions i downloaded (1.8 and 1.9)
There is no MP for v1, all of the configuration is done entirely within the PowerShell.
Hi Guys,
I've setup variables and all, but when i run the script it throws the error below. Do i need to add anything in $prefixRegex = "" ?
Error bellow:
Many thanks in advance.
Do i need to add anything in $prefixRegex = "" ?
No. Using SMLets the PowerShell connects to your SCSM environment and pulls your various configurations (e.g. work item prefixes, file attachment limits, etc.) If this is running on a management server, just make sure the $mgmtServer is set to "localhost" and you have the latest stable version of SMLets.
This is v1.9 correct?