Principal.UserPrincipalName 属性
定义
获取或设置与此主体关联的用户主体名称 (UPN)。Gets or sets the user principal name (UPN) associated with this principal.
public:
property System::String ^ UserPrincipalName { System::String ^ get(); void set(System::String ^ value); };
public string UserPrincipalName { get; set; }
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public string UserPrincipalName { get; set; }
member this.UserPrincipalName : string with get, set
[<get: System.Security.SecurityCritical>]
[<set: System.Security.SecurityCritical>]
member this.UserPrincipalName : string with get, set
Public Property UserPrincipalName As String
属性值
如果尚未设置 UPN,则与此主体关联的 UPN 为 null。The UPN associated with this principal or null if no if the UPN has not been set.
- 属性
例外
基础存储不支持此属性。The underlying store does not support this property.
注解
如果将此属性设置为 null,则将删除现有 UPN (如果存在)。Setting this property to null removes the existing UPN, if one exists.