Forum Discussion
OData
Something from MSDN, might be relevant for your case
https://msdn.microsoft.com/en-us/library/mt634540(v=nav.90).aspx
Credential Lifetime
After having prompted for Basic credentials, the credential are persisted by application and used for as long as they are valid in Microsoft Dynamics NAV. However, the picture is more complicated for OAuth because the security tokens that are used for authentication have a limited lifetime. The code to obtain OAuth credentials was as follows:
The AuthenticationResult actually contains two tokens:
The accessToken is the one that is actually used when the client application calls the web service. The access token is relatively short-lived (one hour, subject to change), and when it expires, the client application needs a new access token.
The refreshToken lives much longer (6 months, subject to change), and it can be used to get a new access token:
On this forum I've seen this problem being resolved when you start refreshing your NAV datasest via the gateway
- LewisH9 years agoHelper II
Thank you for the reply, I've looked into this and don't think this is the casuse. The connection is always fine if no one is on the nav service, it is only until someone logs in it will error. Refreshing the gateway every time this occurs isn't really a viable option.