Member bluvo Posted October 11, 2017 Member #1 Share Posted October 11, 2017 Hello, i have an application to check the current users presence state. But with some users i have a problem to get the current user id. I use the following code: var libManager = new SWConfigDataClientLib.LibManager(false); libManager.BaseProtocol = SWConfigDataClientLib.SProxyObject.BaseProtocol.TCP; libManager.AuthenticationMode = SWConfigDataClientLib.SProxyObject.AuthenticationMode.Trusted; libManager.Username = ""; libManager.Password = ""; libManager.WSBaseUrl = "swyxsrv"; var facade = libManager.GetPhoneClientFacade(); var id = facade.GetCurrentUserID(); // <= throw the following exception Access Denied: The User ... has insufficient privileges for this operation. (SSecurityAccessException) bei SWConfigDataWSLib.Security.SWSSecurityManager.AssertCallingPrincipalRole(IPrincipal principal, String roleName) bei SWConfigDataWSLib.Security.SWSSecurityManager.AssertCallingPrincipalRole(BuildInRoles role) bei SWConfigDataWSLib.WebServices.CPhoneClientFacadeImpl.GetCurrentUserID() (SWConfigDataSharedLib.Exceptions.SSecurityAccessException) The user is member of the system administrator group in SwyxWare, so what is going wrong? Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted October 11, 2017 Most Valued User #2 Share Posted October 11, 2017 Hello, the "AuthenticationMode" is wrong. If you want to use a username and a password for authentication you have to use the "SProxyObject.AuthenticationMode.UsernamePassword". "SWConfigDataClientLib.SProxyObject.AuthenticationMode.Trusted" have to be used for Windows Authentication. Kind regards Sebastian Dreier Link to comment Share on other sites More sharing options...
Member bluvo Posted October 11, 2017 Author Member #3 Share Posted October 11, 2017 Hello, i want to use windows authentication. Is it wrong to clear username and passwort properties? Regards Thomas Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted October 11, 2017 Most Valued User #4 Share Posted October 11, 2017 Hello, oh that was a misunderstanding.... If you do not use the username/password authentication I recommend that you do not set the username and the password property but this is not the source of your problem. Are you sure that your application is running in the correct Windows user account context? Did you add the correct Windows account to the System Administrator group? Furthermore if you want to use the PhoneClient facade you MUST have a SwyxWare user context. This means that you have to assign the Windows Account to a SwyxWare user (can be a dummy user without phone number) otherwise the some methods on the PhoneClient facade are not usable (throw exceptions). Kind regards Sebastian Dreier Link to comment Share on other sites More sharing options...
Member bluvo Posted October 11, 2017 Author Member #5 Share Posted October 11, 2017 Hello, the application is running in the correct windows account, the same windows account is member of the system administrator group in SwyxWare. There is also a swyx user with this windows account assigned. Is it a problem, when this swyx user is assigned with more than one windows account? Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted October 11, 2017 Most Valued User #6 Share Posted October 11, 2017 Please assign the Windows account to one SwyxWare user only and give the SwyxWare user System Admin rights (just for a test). By the way: What SwyxWare do you use (SwyxWare 11 or 2015 R40.3)? Please not that the SwyxWare 2015 SDK (CDS binaries) are not compatible with SwyxWare 11. The new SDK (incl. the CDS binaries) will be released soon. Link to comment Share on other sites More sharing options...
Most Valued User Sebastian Dreier Posted October 12, 2017 Most Valued User #7 Share Posted October 12, 2017 Hello, here is another important information for everybody who work with the Swyx ConfigDataStore (CDS) SDK:SWYXWARE 11 CONFIGDATASTORE API CHANGES (KB4967) German Version:SWYXWARE 11 CONFIGDATASTORE API ÄNDERUNGEN (KB4967) Kind regards Sebastian Dreier Link to comment Share on other sites More sharing options...
Member bluvo Posted October 16, 2017 Author Member #8 Share Posted October 16, 2017 Hello, i've already checked this points: Application is running under the correct windows account Authentication mode is set to Trusted The windows account is assigned to a swyx user, the swyx user has only this one windows account Using the current CDS SDK 2015 R40.3 assemblies The windows user is in the Swyxware System Administrator group The swyx user has System Administrator profile I've run the app with different users, for some it works, for some not. Supplement: It seems to be neccessary, that the windows account is assigned to only one swyx user. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.