Setting up the Teams Bot Integration
For integrating Microsoft Teams with Ivanti Neurons for ITSM, on-premise users should first setup the environment by downloading the package from Ivanti MarketPlace and executing PowerShell script.
What the Powershell Script does?
•Creates the directory in the inetpub folder.
•Creates a new application pool and sets item property for it.
•Creates a new web application and sets item property for it.
•Silently installs the required application, as in you might not get any prompts to proceed with the installation.
•Copies the required binaries to the destination folder.
•Creates the appsetting.json once the ipaddress/machine name/local host name is provided.
Setting up the Central Config API Key
1.Log in to the CentralConfig > Configure Application > Security Controls > ApiKeys.
2.Find the CentralConfigApiKey as shown below and copy the value.
3.Paste the copied value in the appsettings.json file for the CentralConfigApiKey. For example, central-config-api-key"=”xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
Executing the PowerShell Script (from version 2023.4 onwards)
1.Download the zip file to a relevant folder in your machine.
2.Extract the zip file.
3.Open PowerShell as Administrator.
4.Go to the location where the PowerShell script is located, that is, the location where you extracted the zip file.
5.Run the script - .\install.ps1
.
6.Provide relevant details to the below prompts:
•Is the Environment SSL Enabled?
•Please enter the ISM Tenant Id [example: ismtenant.yourdomain.com] only if environment is SSL enabled, otherwise provide app server IP address or host/domain name.
•Please enter the Central Config Tenant Id [example: configtenant.yourdomain.com] only if environment is SSL enabled, otherwise provide server IP address or host/domain name.
The configuration is done.
Executing the PowerShell Script (before version 2023.4)
1.Download the zip file to a relevant folder in your machine.
2.Extract the zip file.
3.Open PowerShell as Administrator.
4.Go to the location where the PowerShell script is located, that is, the location where you extracted the zip file.
5.Run the script - .\TeamsBot.ps1
.
6.You will be prompted for the Appserver as well as the Central Config ipaddress/ Machine name/ localhost name. name/ localhost. Enter the appropriate Address/Machine name/localhost.
The configuration is done.
Troubleshooting

If you provide incorrect IP address/machine name/local host name, open the Appsetting.json file from the folder inetpub >Teams Bot Service verify and replace the value for the following:
•AppServerUri
•CentralConfigUri
•ConfigServiceClientUri

{ "JsonMaxDepth": 128, "MicrosoftAppId": "", "MicrosoftAppPassword": "",
"IPCMServiceName": "/ServiceAPI/IPCMService.asmx", "LogLevel": "DEBUG", "CacheTimeout": "30",
"isOnPremise": true, "central-config-api-key": "", "AppServerUri": "https://ism-onprem15-
tenant1.ivanticlouddev.com/HEAT", "NoOfFAQ": 2, "NoOfKnowledgeBase": 3, "Soap": {
"OpenTimeout": "2", "CloseTimeout": "2", "SendTimeout": "2",
"ReceiveTimeout": "2" }, "CentralConfigUri": "https://cfg-onprem15-
ism.ivanticlouddev.com/CentralConfig", "BuildVersion": "", "ConfigServiceClientUri": "https://cfgonprem15-ism.ivanticlouddev.com/CentralConfig", "ISM_ConfigServiceClientName":
"api/centralconfig", "ConfigServiceClientName": "api/centralconfig", "UseInMemoryState": true,
"SecretStorageUri": "", "RedisStorageConfiguration": { "EnableRedisFlag": true,
"RedisConnectionString": "redis.redis.svc.cluster.local",
"sendmessagetochatservice": "reveivemessagefromteams", "closesocketsignal":
"closesocketsignal" }, "IocServices": [ {
"LifetimeType": "1", "AssemblyName": "ServiceManager.SimpleStorageStrategy",
"ClassName": "ServiceManager.SimpleStorageStrategy.AzureBlobStorage",
"InterfaceName": "ServiceManager.SimpleStorageStrategy.ISimpleStorageStrategy" },
{ "LifetimeType": "1", "AssemblyName":
"ServiceManager.SimpleStorageStrategy", "ClassName":
"ServiceManager.SimpleStorageStrategy.SecretStorage.AppSettingSecretKey",
"InterfaceName": "ServiceManager.SimpleStorageStrategy.SecretStorage.ISimpleSecretStorageStrategy"
}, { "LifetimeType": "1", "AssemblyName":
"ServiceManager.AppServer.WebReference", "ClassName":
"ServiceManager.AppServer.WebReference.IPCMService", "InterfaceName":
"ServiceManager.AppServer.WebReference.IIPCMService" }, {
"LifetimeType": "1", "AssemblyName": "ServiceManager.CentralConfig.WebReference",
"ClassName": "ServiceManager.CentralConfig.WebReference.Rest.ConfigServiceClientJson",
"InterfaceName": "CentralConfig.Contract.IConfigServiceAPI" }, {
"LifetimeType": "1", "AssemblyName": "ServiceManager.Cache",
"ClassName": "HEAT.Cache.InMemory.InMemoryCache", "InterfaceName":
"HEAT.Cache.Contract.ICache" } ] }

If you provide incorrect IP address/machine name/local host name, open the Appsetting.json file from the folder inetpub >Teams Bot Service and replace the AppserverIPAddress with the correct one.

{"MicrosoftAppId"="";"MicrosoftAppPassword"="";"IPCMURL"= "http://$AppserverIPAddress/HEAT/ServiceApi/IPCMService.asmx"; "WorkflowURL"= "http://$AppserverIPAddress/HEAT/ServiceApi/WorkflowService.asmx"; "ConfigURL"= "http://$CentralConfigIPAddress/CentralConfig/ConfigServiceAPI.asmx"; "RetrieveTenantLogLevel_ws_url"= "http=//$CentralConfigIPAddress/CentralConfig/RetrieveTenantLogLevel.ashx"; "EnableCentralLogging"= false; "LoggingService_ws_url"= "http://$AppserverIPAddress/Heat.Logging.Service/api/LoggingService/HeatServiceManagementLogging"; "ElapsedSecondsToFlushLog"= 60; "ItemSizeToFlushLog"= 1000; "LogSettingCacheTimeoutInMinutes"= 5; "SendLogFileLocation"= "C:\logs"; "WriteLogFileLocation"= "C:\logs"; "SendLogWaitInterval"= 300; "WriteLogWaitInterval"= 300; "EnableLogging"= true; "CacheTimeout"= "30"; "isOnPremise": false; ”CentralConfigApiKey”=”” }
Make sure that Boolean values (true/false) don't not have double quotes.