There is a customer who needs to be able to switch mailboxes within Outlook from e.g. example@domain1.com and example@domain2.com.
domain1.com emails should be tracked in CRM, but domain2.com emails should not.
They had been able to use a .reg file to ensure that the CRM plugin is always enabled:
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Outlook\Resiliency\DoNotDisableAddinList]
"crmaddin.Addin"=dword:00000001
Which would be run after Outlook was closed, and before it was re-opened to switch mailbox. This has been working for Outlook 15, but since they moved to O365, the following does not work without throwing a runtime error: [the only change is from 15.0 to 16.0]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\Resiliency\DoNotDisableAddinList]
"crmaddin.Addin"=dword:00000001
This does enable the plugin, but having to click through an error message each time they switch mailboxes is not an ideal solution.
Here is the full text of the exception:
"************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80004005): The add-in you have selected is enabled by your system administrator.
at Microsoft.Office.Core.COMAddIn.set_Connect(Boolean RetValue)
at Microsoft.Crm.Application.SMWrappers.OutlookInstanceCache.SetRibbonAddinConnectState(Boolean connectState)
at Microsoft.Crm.Application.SMWrappers.OutlookInstanceCache.<SetInstanceAndCallbacks>b__41()
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1076.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Microsoft.Crm.Application.Outlook.Components.Platform
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.Application.Outlook.Components.Platform.DLL
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1075.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.Crm.Application.Outlook.OfflineSync
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.Application.Outlook.OfflineSync.DLL
----------------------------------------
Microsoft.Crm.Application.Components.Platform
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.Application.Components.Platform.DLL
----------------------------------------
Microsoft.Crm.Core
Assembly Version: 7.0.0.0
Win32 Version: 7.1.1.1095
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/Microsoft.Crm.Core.DLL
----------------------------------------
Microsoft.Crm.Platform.Sdk
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.Platform.Sdk.DLL
----------------------------------------
Microsoft.Crm
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/Microsoft.Crm.DLL
----------------------------------------
Microsoft.Interop.Mapi.Interfaces
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Interop.Mapi.Interfaces.DLL
----------------------------------------
Microsoft.ExceptionHelper
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.ExceptionHelper.DLL
----------------------------------------
Microsoft.Diagnostics.Tracing.EventSource
Assembly Version: 1.0.18.0
Win32 Version: 1.0.18.0
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/Microsoft.Diagnostics.Tracing.EventSource.DLL
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.Crm.Application.Outlook.WebBrowser
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.Application.Outlook.WebBrowser.DLL
----------------------------------------
Microsoft.Xrm.Sdk
Assembly Version: 7.0.0.0
Win32 Version: 7.1.1.1095
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/Microsoft.Xrm.Sdk.DLL
----------------------------------------
WinFormsRegions
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/WinFormsRegions.DLL
----------------------------------------
CustomMarshalers
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------
Microsoft.Office.Interop.Outlook
Assembly Version: 15.0.0.0
Win32 Version: 15.0.4569.1507
CodeBase: file:///C:/windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Outlook/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll
----------------------------------------
office
Assembly Version: 15.0.0.0
Win32 Version: 15.0.4613.1000
CodeBase: file:///C:/windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1067.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Crm.ObjectModel
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.ObjectModel.DLL
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.SqlServerCe
Assembly Version: 4.0.0.0
Win32 Version: 4.0.8876.1
CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Data.SqlServerCe/4.0.0.0__89845dcd8080cc91/System.Data.SqlServerCe.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1055.0 built by: NETFXREL2
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Interop.SHDocVw.DLL
----------------------------------------
Microsoft.Crm.Core.Extensions
Assembly Version: 7.0.0.0
Win32 Version: 7.1.1.1095
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/Microsoft.Crm.Core.Extensions.DLL
----------------------------------------
Microsoft.Crm.MapiShared
Assembly Version: 7.0.0.0
Win32 Version: 7.1.0001.3113
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Dynamics%20CRM/Client/res/web/bin/Microsoft.Crm.MapiShared.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box"