How can I store the userPrincipalName value from an AD search into a textbox. When I try to set TextBox1.Text = resEnt.GetDirectoryEntry().Properties("givenName").Value() it is no problem. However, if I try TextBox1.Text = resEnt.GetDirectoryEntry().Properties("userPrincipalName").Value() then I receive an error about "The directory datatype cannot be converted to/from a native DS datatype".
Our community of experts have been thoroughly vetted for their expertise and industry experience.