示例#1
0
 /// <summary>
 /// Convert from an Active Directory User Principal Name (UPN) to a down-level NT4 style name.
 /// </summary>
 public static string TranslateUpnToDownLevel(string userPrincipalName)
 {
     string downLevelName;
     ActiveDs.NameTranslate nt = new ActiveDs.NameTranslate();
     nt.Set(NameTypeUpn, userPrincipalName);
     downLevelName = nt.Get(NameTypeNt4);
     return downLevelName;
 }
示例#2
0
 /// <summary>
 /// Convert from a down-level NT4 style name to an Active Directory User Principal Name (UPN).
 /// </summary>
 public static string TranslateDownLevelToUpn(string downLevelNt4Name)
 {
     string userPrincipalName;
     ActiveDs.NameTranslate nt = new ActiveDs.NameTranslate();
     nt.Set(NameTypeNt4, downLevelNt4Name);
     userPrincipalName = nt.Get(NameTypeUpn);
     return userPrincipalName;
 }
示例#3
0
        /// <summary>
        /// Convert from an Active Directory User Principal Name (UPN) to a down-level NT4 style name.
        /// </summary>
        public static string TranslateUpnToDownLevel(string userPrincipalName)
        {
            string downLevelName;

            ActiveDs.NameTranslate nt = new ActiveDs.NameTranslate();
            nt.Set(NameTypeUpn, userPrincipalName);
            downLevelName = nt.Get(NameTypeNt4);
            return(downLevelName);
        }
示例#4
0
        /// <summary>
        /// Convert from a down-level NT4 style name to an Active Directory User Principal Name (UPN).
        /// </summary>
        public static string TranslateDownLevelToUpn(string downLevelNt4Name)
        {
            string userPrincipalName;

            ActiveDs.NameTranslate nt = new ActiveDs.NameTranslate();
            nt.Set(NameTypeNt4, downLevelNt4Name);
            userPrincipalName = nt.Get(NameTypeUpn);
            return(userPrincipalName);
        }