web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Outlook Add In Document View Authentication Problem

(2) ShareShare
ReportReport
Posted on by 25
Hi guys,
we are using the BC Outlook AddIn in an OnPrem environment with a local Exchange Server 2019.
I ve managed to get the Connection working with the contact AddIn and WITHOUT Entra. We are using the Classic NavUserPassword connection.
When using the Document View i ve get som errors.
 
First Error:
Category: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticateServiceController
EventId: 0
ConnectionId: 0HN32JKIUL62T
RequestId: 0HN32JKIUL62T:0000000D
RequestPath: /XXX/auth
ActionId: df058e48-f071-48ab-aae4-4073fc44b676
ActionName: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticateServiceController.InvokeMethod (Prod.Client.WebCoreApp)
MemberName: GetAccessTokenFromSharedCookie
FilePath: s://repo//src//Platform//Client//Web//Prod.Client.WebCoreApp//Controllers//Services//AuthenticateServiceController.cs
LineNumber: 347
 Shared cookie was not found in the authenticate request.
 
Second Error
Server instance: XXX
Tenant ID: 
Environment Name: 
Environment Type: 
User: 
Type: System.AggregateException
Message: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The request failed. Unauthorized)
HResult: -2146233088
----------------------------------
Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Message: The request failed. Unauthorized
Source: Microsoft.Exchange.WebServices.NETStandard
HResult: -2146233088
----------------------------------
Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Message: The request failed. Unauthorized
Source: Microsoft.Exchange.WebServices.NETStandard
HResult: -2146233088
StackTrace:
     at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request, CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecuteAsync(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ExecuteAsync(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem(ItemId itemId, PropertySet propertySet, CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet, CancellationToken token)
StackTrace:
     at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request, CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecuteAsync(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ExecuteAsync(CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem(ItemId itemId, PropertySet propertySet, CancellationToken token)
     at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet, CancellationToken token)
----------------------------------
 
It seems like the addin uses a token in a cookie to authenticate against the server instance, but the cookie isnt there.
Does anyone have a clue?
 
Environment Information
BC Version 23.5 OnPrem
AddIn 2.1
Exchange 2019 OnPrem
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,750 Super User 2025 Season 2 on at
    Hi, please confirm whether the following two points have been set.
    In Exchange Server: Enable access to EWS.
    Configure Business Central Web Server to use SSL (https).
     
     
    Hope this helps.
    Thanks.
    ZHU
  • LN-26111544-0 Profile Picture
    25 on at
    Good morning ZHU,
    thanks for your reply. :)
    EWSEnabled is set to TRUE on the Exchange Server. That was the only property set there. 
    IIS is using SSL
    WebserverInstance and ServerInstance are using SSL, too:
    NavServer
    KeyName ServicesCertificateThumbprint -KeyValue $DomainCertThumb
    KeyName ClientServicesSSLEnabled -KeyValue true
    KeyName SOAPServicesSSLEnabled -KeyValue true
    KeyName ODataServicesSSLEnabled -KeyValue true
    KeyName ClientServicesCredentialType -KeyValue NavUserPassword
    KeyName ManagementApiServicesEnabled -KeyValue true
    KeyName ManagementApiServicesSSLEnabled -KeyValue true
    KeyName ManagementApiServicesEnabled -KeyValue true
    Keyname ExchangeAuthenticationMetadataLocation -Keyvalue 'https://owa.XXX.de/'
    ValidAudiences -Keyvalue "https://XXX:443/$ServerInstance"
    Keyname PublicWebBaseUrl -Keyvalue "https://XXX/$ServerInstance"
     
    WebServer
    keyname ClientServicesCredentialType -KeyValue NavUserPassword
    keyname ServerHttps -KeyValue true
    keyname RequireSsl -KeyValue true
    keyname DnsIdentity -KeyValue "XXX.de"
     
     
    The credential pompt came up and the  Contact Insights.xml 
    is working fine. Only Document View xml has the prblem.

    Best regards,
    Louis
  • D Curd Profile Picture
    71 on at
    Hi,
    Did you get to the bottom of this? We are getting the same error from the Outlook addin, our customer have on prem BC and Exchange Online.
     
    Category: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticateServiceController
    EventId: 0
    ConnectionId: 0HNBIG4TKIE2Q
    RequestId: 0HNBIG4TKIE2Q:0000002D
    RequestPath: /BCTest/auth
    ActionId: b0e02db4-c666-44a6-a0d6-8dde08f8a3da
    ActionName: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticateServiceController.InvokeMethod (Prod.Client.WebCoreApp)
    MemberName: GetAccessTokenFromSharedCookie
    FilePath: s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\Controllers\Services\AuthenticateServiceController.cs
    LineNumber: 347
     Shared cookie was not found in the authenticate request.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans