MS Teams Integration does not work

Using the new eM Client v10.0.3123. Connected my Microsoft Teams Account - went through without error.

eM Client however does not connect to MS Teams:

  • Activate “Online Status” → green
  • Chat Window show “Archiv wird geladen”
  • After several seconds window shows “Chatkonto ist im offline Modus”
  • Can also not start new chats

Edit: Log:

eM Client 10.0.3123+254aa4988a (Windows)

10:27:33 REDACTED [Microsoft Teams] System.NullReferenceException: Object reference not set to an instance of an object.
at MailClient.Storage.Data.DbRepository1.ConvertQuery(QueryCondition condition, ProcessFieldCallback fieldCallback, QueryContext context) at MailClient.Storage.Data.DbRepository1.ConvertQuery(QueryCondition condition, ProcessFieldCallback fieldCallback, QueryContext context)
at MailClient.Storage.Data.DbRepository1.ConvertQueryToString(QueryCondition query, ProcessFieldCallback fieldCallback, QueryContext context, OrderModifier order, Nullable1 limit)
at MailClient.Storage.Data.DbRepository1.FindEnumerable..ctor(QueryCondition condition, OrderModifier order, Nullable1 limit, DbRepository1 repository) at MailClient.Storage.Data.DbRepository1.Find(QueryCondition condition, OrderModifier order, Nullable1 limit) at MailClient.Storage.Attachment.Data.ItemWithAttachmentRepositoryAdapter1.Find(QueryCondition condition, OrderModifier order, Nullable1 limit) at MailClient.Storage.Application.Contact.ContactItemCollection.FindItemByUniqueId(String uid) at MailClient.Protocols.Teams.TeamsContactSynchronizer.ConvertChat(TeamsChat chat) at MailClient.Protocols.Teams.TeamsContactSynchronizer.ConvertChats(IEnumerable1 chats)+MoveNext()
at System.Collections.Generic.List1.AddRange(IEnumerable1 collection)
at MailClient.Protocols.Common.ItemSynchronizeContext2.<>c__DisplayClass20_03.g__FlushItems|1(Int32 threshold)
at MailClient.Protocols.Common.ItemSynchronizeContext2.Synchronize[T,TUid,TVid](SynchronizationType synchronizationType, IEnumerable1 items, Func2 getUniqueId, Func2 getVersionId, Func3 hasChanged, Func2 isDeleted, Func2 convertItems, Action2 updateItem)
at MailClient.Protocols.Teams.TeamsContactSynchronizer.SynchronizeAsync(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken) at MailClient.Protocols.Teams.TeamsContactSynchronizer.Synchronize(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass40_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct) at MailClient.Protocols.Teams.TeamsCommand.ExecuteAsync(WorkerStatus status) at MailClient.Protocols.Teams.TeamsCommand.Execute(WorkerStatus status) at MailClient.Commands.Command.Process(WorkerStatus status) GUIStatus_Exception_Reported = True RunInPlace = False EnqueuedStackTrace = at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass40_0.b__0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline)
at MailClient.Protocols.Common.ItemSynchronizer2.Synchronize(Folder folder, SynchronizationPriority priority, Action1 completed)
at MailClient.Protocols.Teams.TeamsAccount.GoOnlineInt()
at MailClient.Protocols.Common.AccountBase.ChangeOnlineState(Boolean online, OfflineReason offlineReason)
at MailClient.Protocols.Common.AccountBase.GoOnline()
at MailClient.Accounts.AccountUtils.RestoreBrokenConnection(IAccount account)
at MailClient.Accounts.AccountManager.ReceiveAllInternal(Boolean checkIncludeInGlobalOperations, Boolean fromBackgroundSync)
at MailClient.Accounts.AccountManager.SendAndReceiveAll(Boolean checkIncludeInGlobalOperations)
at MailClient.Accounts.DesktopAccountManager.timerSendAndReceive_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
at Windows.Win32.PInvoke.DispatchMessage(MSG* lpMsg)
at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at MailClient.Program.<>c.b__205_3()
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)
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()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at MailClient.Common.UI.Forms.BaseForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
at Xilium.CefGlue.Interop.libcef.run_message_loop()
at MailClient.Program.Main(String args)

Could you provide us with the log files related to this issue?
Logging needs to be enabled here first: Settings → Advanced → Logging → Find your teams account and enable checkbox
Then switch teams account to online.
Teams protocol logs in logs folder ends with ‘Microsoft Teams.log’

Of course, here is the tail of the log “C:\Users\XXX\AppData\Roaming\eM Client\Logs\2024-07-11_08-45-15 XXX@XXX Microsoft Teams.log”

I post only the tail as the log itself holds a lot of email addresses and chat content I do not want to share in a public forum. Please let me know if you need more content of the log file but provide me an private upload source.

— snip —

08:45:25.743|00D| Request:
08:45:25.743|00D| Method: GET, RequestUri: ‘https://graph.microsoft.com/v1.0/chats?$expand=members%2ClastMessagePreview&$filter=chatType+eq+‘group’+or+chatType+eq+‘oneOnOne’&$skiptoken=1.kscDYs0BEcYAAAEU8P8DgapQcm9wZXJ0aWVzgqlTeW5jU3RhdGXZ6GV5SmtaV3hwZG1WeVpXUlRaV2R0Wlc1MGN5STZXM3NpYzNSaGNuUWlPaUl5TURJekxURXdMVEV5VkRBM09qRTVPakEzTGpFNU1pc3dNRG93TUNJc0ltVnVaQ0k2SWpJd01qUXRNRGN0TVRCVU1USTZOVGc2TURJdU56WXpLekF3T2pBd0luMWRMQ0o2WlhKdlRFMVRWRVJsYkdsMlpYSmxaRk5sWjIxbGJuUnpJanBiWFN3aWMyOXlkRTl5WkdWeUlqb3dMQ0pwYm1Oc2RXUmxXbVZ5YjB4TlUxUWlPbVpoYkhObGZRPT2sTGFzdFBhZ2VTaXplojIw’, Version: 1.1, Content: , Headers:
08:45:25.743|00D| {
08:45:25.743|00D| Accept: application/json
08:45:25.743|00D| Authorization:
08:45:25.743|00D| User-Agent: eMClient/10.0.3125.0
08:45:25.743|00D| FeatureFlag: 00000056
08:45:25.743|00D| }
08:45:25.743|00D|
08:45:25.743|00D| Response:
08:45:26.319|007| StatusCode: 200, ReasonPhrase: ‘OK’, Version: 1.1, Content: System.Net.Http.DecompressionHandler+GZipDecompressedContent, Headers:
08:45:26.319|007| {
08:45:26.319|007| Transfer-Encoding: chunked
08:45:26.319|007| Vary: Accept-Encoding
08:45:26.319|007| Strict-Transport-Security: max-age=31536000
08:45:26.319|007| request-id: 49a40baf-7857-475b-ab01-3119513403ec
08:45:26.319|007| client-request-id: 49a40baf-7857-475b-ab01-3119513403ec
08:45:26.319|007| x-ms-ags-diagnostic: {“ServerInfo”:{“DataCenter”:“Germany West Central”,“Slice”:“E”,“Ring”:“4”,“ScaleUnit”:“003”,“RoleInstance”:“FR1PEPF00001027”}}
08:45:26.319|007| OData-Version: 4.0
08:45:26.319|007| Date: Thu, 11 Jul 2024 06:45:41 GMT
08:45:26.319|007| Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
08:45:26.319|007| }
08:45:26.319|007| {“@odata.context”:“https://graph.microsoft.com/v1.0/$metadata#chats(members(),lastMessagePreview())”,“@odata.count”:3,

NEXT LINE REDACTED FOR PRIVACY

08:45:26.319|007| AccountBase.ChangeOnlineState : State changed to OFFLINE due BrokenConnection
08:45:26.324|013| Exception: System.NullReferenceException: Object reference not set to an instance of an object.
08:45:26.324|013| at MailClient.Storage.Data.DbRepository1.ConvertQuery(QueryCondition condition, ProcessFieldCallback fieldCallback, QueryContext context) 08:45:26.324|013| at MailClient.Storage.Data.DbRepository1.ConvertQuery(QueryCondition condition, ProcessFieldCallback fieldCallback, QueryContext context)
08:45:26.324|013| at MailClient.Storage.Data.DbRepository1.ConvertQueryToString(QueryCondition query, ProcessFieldCallback fieldCallback, QueryContext context, OrderModifier order, Nullable1 limit)
08:45:26.324|013| at MailClient.Storage.Data.DbRepository1.FindEnumerable..ctor(QueryCondition condition, OrderModifier order, Nullable1 limit, DbRepository1 repository) 08:45:26.324|013| at MailClient.Storage.Data.DbRepository1.Find(QueryCondition condition, OrderModifier order, Nullable1 limit) 08:45:26.325|013| at MailClient.Storage.Attachment.Data.ItemWithAttachmentRepositoryAdapter1.Find(QueryCondition condition, OrderModifier order, Nullable1 limit) 08:45:26.325|013| at MailClient.Storage.Application.Contact.ContactItemCollection.FindItemByUniqueId(String uid) 08:45:26.325|013| at MailClient.Protocols.Teams.TeamsContactSynchronizer.ConvertChat(TeamsChat chat) 08:45:26.325|013| at MailClient.Protocols.Teams.TeamsContactSynchronizer.ConvertChats(IEnumerable1 chats)+MoveNext()
08:45:26.325|013| at System.Collections.Generic.List1.AddRange(IEnumerable1 collection)
08:45:26.325|013| at MailClient.Protocols.Common.ItemSynchronizeContext2.<>c__DisplayClass20_03.g__FlushItems|1(Int32 threshold)
08:45:26.325|013| at MailClient.Protocols.Common.ItemSynchronizeContext2.Synchronize[T,TUid,TVid](SynchronizationType synchronizationType, IEnumerable1 items, Func2 getUniqueId, Func2 getVersionId, Func3 hasChanged, Func2 isDeleted, Func2 convertItems, Action2 updateItem)
08:45:26.325|013| at MailClient.Protocols.Teams.TeamsContactSynchronizer.SynchronizeAsync(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken) 08:45:26.325|013| at MailClient.Protocols.Teams.TeamsContactSynchronizer.Synchronize(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
08:45:26.325|013| at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass40_2.b__6(WorkerStatus status, CancellationToken ct)
08:45:26.325|013| at MailClient.Protocols.Teams.TeamsCommand.ExecuteAsync(WorkerStatus status)
08:45:26.325|013| at MailClient.Protocols.Teams.TeamsCommand.Execute(WorkerStatus status)
08:45:26.325|013| at MailClient.Commands.Command.Process(WorkerStatus status)

Could you please send the entire log to my email at [email protected]? In the tail of the log is missing information that I need to identify the cause of the problem. Thank you.

You got mail :slight_smile: