Overview
When attempting to sync your Okta User Group via the M-Files Admin, you may see the following error:
In the Windows event log, you may also find an error like this:
Retrieving group '[your user group name]" from Okta failed.System.AggregateException: One or more errors occurred. ---> Okta.Sdk.OktaOAuthException: invalid_client (401, The client_assertion token has an expiration too far into the future.) at Okta.Sdk.Internal.DefaultOAuthTokenProvider.<RequestAccessTokenAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Okta.Sdk.Internal.DefaultOAuthTokenProvider.<GetAccessTokenAsync>d__9.MoveNext() --- End of stack
Solution
The likely cause of this issue is that the M-Files Server/Client times are not synchronized with your Okta authorization server. On the M-Files end, ensure your client and server are synchronized (see Clocks between server and client are not synchronized (site.com)).
In Okta, ensure your authorization server is also in the same time zone as your M-Files Server/Client.
In the M-Files Cloud, the servers are in UTC time zone, so the Okta service must take that into account.
