Skip to content

UserPrincipal.Current.DisplayName causes invalid cast exception on login #7

@JBoman32768

Description

@JBoman32768

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions