Hey,
we have the following problem with some logins from our employees, when they change the company or the role center, they cant access the WebClient. Becase the browser is constantly reloading the start page from Business Central and the can't interact with it.
When they use a different browser or open/close the browser it works for a period of time again without problems.
We use the ACS credential type (Azure AD Authentication) with BC20 CU8 with Open-ID.
In the event log I often find the following:
Fehler beim Zugriff auf die Website TEST2024AD
Type: Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException
ErrorCode: -1
SuppressMessage: False
ContainsPersonalOrRestrictedInformation: False
DiagnosticsSuppress: False
MessageWithoutPrivateInformation: Exception of type 'Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException' was thrown.
SuppressExceptionCreatedEvent: False
FatalityScope: None
ErrorLevel: Error
Message: Exception of type 'Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException' was thrown.
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection
HResult: -2146233088
StackTrace:
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.PromptForCredentials() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 953
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.OpenConnection[TChannel](ConnectionRequest connectionRequest, ConnectionOptions connectionOptions, UserSettings& userSettings) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 187
at Microsoft.Dynamics.Nav.Client.ServiceConnection.OpenConnection() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 780
at Microsoft.Dynamics.Nav.Client.ServiceConnection.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 524
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceIsHandshakeNeeded(IService service) in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 100
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceAndPerformAcsHandshakeIfNeeded() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 76
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.OpenConnectionToServer() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 349
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.InitializeCore() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 165
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 78
at Microsoft.Dynamics.Framework.UI.UISession.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Session\UiSession.cs:line 1216
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 69
at Microsoft.Dynamics.Nav.WebClient.NavWebClientUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebClient\Session\NavWebClientUISessionInitializer.cs:line 75
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.Initialize(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 57
at Microsoft.Dynamics.Framework.UI.Web.WebOpenFormExecutionStrategy.TryInitializeUiSession(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.Web\Interactions\ExecutionStrategies\WebOpenFormExecutionStrategy.cs:line 63
at Microsoft.Dynamics.Framework.UI.Client.OpenFormExecutionStrategy.Execute() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Client\Interactions\ExecutionStrategies\OpenFormExecutionStrategy.cs:line 54
at Microsoft.Dynamics.Framework.UI.InteractionManager.<>c__DisplayClass8_2.<InvokeInteractions>b__4() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Interactions\InteractionManager.cs:line 156
StackTrace:
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.PromptForCredentials() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 953
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.OpenConnection[TChannel](ConnectionRequest connectionRequest, ConnectionOptions connectionOptions, UserSettings& userSettings) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 187
at Microsoft.Dynamics.Nav.Client.ServiceConnection.OpenConnection() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 780
at Microsoft.Dynamics.Nav.Client.ServiceConnection.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 524
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceIsHandshakeNeeded(IService service) in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 100
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceAndPerformAcsHandshakeIfNeeded() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 76
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.OpenConnectionToServer() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 349
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.InitializeCore() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 165
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 78
at Microsoft.Dynamics.Framework.UI.UISession.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Session\UiSession.cs:line 1216
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 69
at Microsoft.Dynamics.Nav.WebClient.NavWebClientUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebClient\Session\NavWebClientUISessionInitializer.cs:line 75
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.Initialize(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 57
at Microsoft.Dynamics.Framework.UI.Web.WebOpenFormExecutionStrategy.TryInitializeUiSession(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.Web\Interactions\ExecutionStrategies\WebOpenFormExecutionStrategy.cs:line 63
at Microsoft.Dynamics.Framework.UI.Client.OpenFormExecutionStrategy.Execute() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Client\Interactions\ExecutionStrategies\OpenFormExecutionStrategy.cs:line 54
at Microsoft.Dynamics.Framework.UI.InteractionManager.<>c__DisplayClass8_2.<InvokeInteractions>b__4() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Interactions\InteractionManager.cs:line 156
Category: Microsoft.Dynamics.Framework.UI.WebBase.ClientExceptionStateProcessingStrategy
EventId: 0
ConnectionId: 0HMQ4N8VQ37AE
RequestId: 0HMQ4N8VQ37AE:0000000E
RequestPath: /TEST2024AD/csh
TransportConnectionId: PaORpOb6EQcUPVPlesTBVg
Exception of type 'Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException' was thrown.
Exception:
Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException: Exception of type 'Microsoft.Dynamics.Nav.Types.NavCancelCredentialPromptException' was thrown.
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.PromptForCredentials() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 953
at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.OpenConnection[TChannel](ConnectionRequest connectionRequest, ConnectionOptions connectionOptions, UserSettings& userSettings) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 187
at Microsoft.Dynamics.Nav.Client.ServiceConnection.OpenConnection() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 780
at Microsoft.Dynamics.Nav.Client.ServiceConnection.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ServiceConnection.cs:line 524
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceIsHandshakeNeeded(IService service) in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 100
at Microsoft.Dynamics.Nav.Client.FormBuilder.AcsHandshakeHandler.InitializeServiceAndPerformAcsHandshakeIfNeeded() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\AcsHandshakeHandler.cs:line 76
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.OpenConnectionToServer() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 349
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.InitializeCore() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 165
at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSessionInitializer.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.Client.Builder\BuilderSession\BuilderSessionInitializer.cs:line 78
at Microsoft.Dynamics.Framework.UI.UISession.Initialize() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Session\UiSession.cs:line 1216
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 69
at Microsoft.Dynamics.Nav.WebClient.NavWebClientUISessionInitializer.InitializeCore(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebClient\Session\NavWebClientUISessionInitializer.cs:line 75
at Microsoft.Dynamics.Nav.Client.Web.NavWebUISessionInitializer.Initialize(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.WebCommon\Session\NavWebUISessionInitializer.cs:line 57
at Microsoft.Dynamics.Framework.UI.Web.WebOpenFormExecutionStrategy.TryInitializeUiSession(UISession session) in s:\repo\src\Platform\Client\Web\Prod.Client.Web\Interactions\ExecutionStrategies\WebOpenFormExecutionStrategy.cs:line 63
at Microsoft.Dynamics.Framework.UI.Client.OpenFormExecutionStrategy.Execute() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Client\Interactions\ExecutionStrategies\OpenFormExecutionStrategy.cs:line 54
at Microsoft.Dynamics.Framework.UI.InteractionManager.<>c__DisplayClass8_2.<InvokeInteractions>b__4() in s:\repo\src\Platform\Client\Shared\Prod.ClientFwk\Interactions\InteractionManager.cs:line 156
Does anyone have an idea how to fix this issue? Because it's really annoying for the people that work with it every day.
Here I found something for that error:
https://forum.mibuso.com/discussion/77398/user-log-in-error-navcancelcredentialpromptexception
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/authenticating-users-with-azure-ad-overview#configure-legacy-ws-federation-in-version-20-and-21
Enable UseLegacyAcsAuthentication but then the WebClient uses Legacy WS-Federation again.. And thats something that I don't really want to change.. Why stepping back to the old method?
And here:
https://www.dabbler.dk/index.php/2019/07/18/microsoft-dynamics-365-business-central-webclient-with-no-role-center/
Thank you for your help!
best regards,
Robin