

$CurrentUserSid = ::GetCurrent().User.Value The script can also be found on my Github This is primarily written for Office 365 and not on-prem services.Īnyway this is the script we used and deployed to the users, and the script should automatically adopt to your environment without changes. Note! This script is totally without error control, and may or may not work in your environment, it is depended on your setup and configuration. The problem was that some of the keys needed the UPN, so this ended up with a PowerShell script. I found a couple of registry key with Sysinternals tools procmon.exe and created a registry file to import. In our case this was not very user-friendly so we needed to solve this Solution When you deploy for example Office 365 with Skype, the Skype for Business client will start automatically start but it will ask the user to apply the UPN, User Principal Name, to get signed in, like the picture.

A while ago I search for information to auto sign-in Lync/Skype for Business users, in my case Office 2013, found many resource but none seemed reliable and could solve my specific problem to sign in the user.
