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

An error has occurred on Login Page After Setting up authentication Type to AAD

(0) ShareShare
ReportReport
Posted on by

Hello,

I'm currently seting up a Business Central (on-prem) running on docker container. Initially, it was set up with authentication = NavUserPass and what i need is to change it to AccessControlService/AAD. 
I followed the steps carefully an article "Authenticating Business Central Users with Azure Active Directory" - https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/authenticating-users-with-azure-active-directory?tabs=singletenant%2Cadmintool 

however, when i finished an tryng to access the web client, i'm getting a very generic  error: "An error has occurred"

pastedimage1618064873454v2.png

Please note that there are no other details can be found on console or network.

I hope someone can help me on this.

Regards,

Jerome

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    You cannot tell the reason by looking at this generic error. You must have a look at the application event log file to get a clue what to look out for. E.g. via this posting you can get to the application event log file.

    www.hougaard.com/.../

    Thanks.

  • EssexRocks Profile Picture
    49 on at

    I am not using Docker but have the same issue. Looking at the event log is not helping much but this is the 2 errors in event log. I am trying to get a v22 install up using OpenID with AAD. I had  AAD working fine with the V20 but this was not using OpenID. I followed the details in Configure Azure Active Directory Authentication with OpenID Connect - Business Central | Microsoft Learn and Authenticating Business Central Users with Azure Active Directory - Business Central | Microsoft Learn and ended up with the "An error occurred" on the access to the BC

    Category: Microsoft.Dynamics.Framework.UI.WebBase.ClientExceptionStateProcessingStrategy
    EventId: 0
    ConnectionId: 0HMR5PIQ62KUN
    RequestId: 0HMR5PIQ62KUN:00000004
    RequestPath: /BC220/SignIn
    ActionId: 46dffd0d-7a6d-4cb3-b539-5c15b375dd23
    ActionName: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticationController.SignIn (Prod.Client.WebCoreApp)
    MemberName: TryToSendToTelemetry
    FilePath: s:\repo\src\Platform\Client\Web\Prod.Client.WebBase\Exception\ClientExceptionStateProcessingStrategy.cs
    LineNumber: 88

    Exception:
    System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
    at Microsoft.Dynamics.Nav.Common.Http.HttpServiceClient.CallService[T](String requestUrl, HttpMethod method, Object content) in s:\repo\src\Platform\ClientServerShared\Prod.Common\Http\HttpServiceClient.cs:line 96
    at Microsoft.Dynamics.Nav.Client.ClientConfigurationClient.GetClientConfiguration(String tenantId, String applicationId) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\HttpService\ClientConfigurationClient.cs:line 39
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerConfigurationOperation.GetClientConfiguration(RequestContext requestContext) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\ClientServerConfigurationOperation.cs:line 55
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.RetrieveClientConfiguration() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 103
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.TryGetSettingsValue[T](String settingName, T& value) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 49
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerSettingsProvider.get_ACSUri() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\ClientServerSettingsProvider.cs:line 207
    at Prod.Client.WebCoreApp.Authentication.AcsAuthenticationProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\AcsAuthenticationProvider.cs:line 45
    at Prod.Client.WebCoreApp.Authentication.TokenAuthenticationPairingProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\TokenAuthenticationPairingProvider.cs:line 51
    at Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticationController.SignIn(String returnUrl) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\Controllers\AuthenticationController.cs:line 63
    at lambda_method13(Closure , Object , Object[] )
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

    And before this I get

    Error accessing Website BC220
    Type: System.Net.Http.HttpRequestException
    StatusCode: NotFound
    Message: Response status code does not indicate success: 404 (Not Found).
    Source: System.Net.Http
    HResult: -2146233088
    StackTrace:
    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
    at Microsoft.Dynamics.Nav.Common.Http.HttpServiceClient.CallService[T](String requestUrl, HttpMethod method, Object content) in s:\repo\src\Platform\ClientServerShared\Prod.Common\Http\HttpServiceClient.cs:line 96
    at Microsoft.Dynamics.Nav.Client.ClientConfigurationClient.GetClientConfiguration(String tenantId, String applicationId) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\HttpService\ClientConfigurationClient.cs:line 39
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerConfigurationOperation.GetClientConfiguration(RequestContext requestContext) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\ClientServerConfigurationOperation.cs:line 55
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.RetrieveClientConfiguration() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 103
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.TryGetSettingsValue[T](String settingName, T& value) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 49
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerSettingsProvider.get_ACSUri() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\ClientServerSettingsProvider.cs:line 207
    at Prod.Client.WebCoreApp.Authentication.AcsAuthenticationProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\AcsAuthenticationProvider.cs:line 45
    at Prod.Client.WebCoreApp.Authentication.TokenAuthenticationPairingProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\TokenAuthenticationPairingProvider.cs:line 51
    at Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticationController.SignIn(String returnUrl) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\Controllers\AuthenticationController.cs:line 63
    at lambda_method13(Closure , Object , Object[] )
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    StackTrace:
    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
    at Microsoft.Dynamics.Nav.Common.Http.HttpServiceClient.CallService[T](String requestUrl, HttpMethod method, Object content) in s:\repo\src\Platform\ClientServerShared\Prod.Common\Http\HttpServiceClient.cs:line 96
    at Microsoft.Dynamics.Nav.Client.ClientConfigurationClient.GetClientConfiguration(String tenantId, String applicationId) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\HttpService\ClientConfigurationClient.cs:line 39
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerConfigurationOperation.GetClientConfiguration(RequestContext requestContext) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\ClientServerConfigurationOperation.cs:line 55
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.RetrieveClientConfiguration() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 103
    at Microsoft.Dynamics.Nav.Client.Web.WebClientSettingsProvider.TryGetSettingsValue[T](String settingName, T& value) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Services\Settings\WebClientSettingsProvider.cs:line 49
    at Microsoft.Dynamics.Nav.Client.Web.ClientServerSettingsProvider.get_ACSUri() in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\ClientServerSettingsProvider.cs:line 207
    at Prod.Client.WebCoreApp.Authentication.AcsAuthenticationProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\AcsAuthenticationProvider.cs:line 45
    at Prod.Client.WebCoreApp.Authentication.TokenAuthenticationPairingProvider.EarlyAuthenticate(HttpContext context, AuthenticationActionResult& authenticationResult) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\session\Authentication\TokenAuthenticationPairingProvider.cs:line 51
    at Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticationController.SignIn(String returnUrl) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCoreApp\Controllers\AuthenticationController.cs:line 63
    at lambda_method13(Closure , Object , Object[] )
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

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,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans