When logging into Project Online from a WIndows 10 AzureAD joined machine UserPrincipal.Current.DisplayName produces exception
Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
Looks like its trying to get the displayname for the user currently logged into the local computer - which in most cases is irrelevant to the login to the remote system.
When logging into Project Online from a WIndows 10 AzureAD joined machine UserPrincipal.Current.DisplayName produces exception
Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
Looks like its trying to get the displayname for the user currently logged into the local computer - which in most cases is irrelevant to the login to the remote system.