Solved (Answerr the question is no longer required)
Replacing with new SDK 365 dll solved the example in "SDK\SampleCode\CS\GeneralProgramming\Authentication"
The same problem is present during connection from Microsoft Dynamic Nav 2016 9.0.47838.0 (on-premise) using latest version DLL and Microsoft…
Check my article about development of Html webresources - butenko.pro/.../howto-htmljs-webresources
Business Applications communities