The UserName property specifies the username used to
authenticate the user on the current server. This property must be
set to access resources that are restricted on the server. Note that
it is required to set both the UserName and Password
properties to enable client authentication.
If your application needs to use OAuth 2.0 for authentication, it
is recommended you set the BearerToken property,
which will automatically set the correct authentication type.