Hi all:

I am looking for a way to bind to a user in AD by using the User Principal
Name (Which I believe is the field on the Account tab Called User Login
Name). Now I am using the code below which correctly binds to the AD user if
the Display name is the same as the UPN but it will not bind if the Display
name is set to last name, first name. When the script runs correctly it then
updates the description field for the user, disables it and then moves it to
a deletions OU, but if I cannot bind to the user then it will not do all of
this stuff.

EX1

Display Name = aa123
UPN = aa123

works correctly binds and script continues if user enters aa123 user into
code below


EX2

Display name = Doe, John
UPN = aa123

does not find or bind to the user if you enter aa123 - script error


EX3

Display name = Doe, John
UPN-aa123

does find the user if you enter doe, john but the script will not update the
description field for the user or the rest of the .


Set objUser = GetObject _
("LDAP://cn="& getuser &",OU=users,OU=MANAGED DESKTOP
SERVICES,OU=HHH,DC=aa,DC=abc,DC=com")


where getuser is an input from a html form


Any suggestions on how to bind to the UPN as most of our users have ad id
that is not their last name, first name. Thanks

Re: Binding to a user principal name in ad by rwh

rwh
Wed Aug 17 12:20:27 CDT 2005

I believe you are thinking of sAMAccountName: instead.
If you wnt to use UPN that value is called userPrincipalName: and it is
formatted as loginid@domain.com


Re: Binding to a user principal name in ad by Lost

Lost
Wed Aug 17 12:47:06 CDT 2005

Thanks, so is there a way to bind to samAccountName instead of the display
name?

"rwh@rodharrison.com" wrote:

> I believe you are thinking of sAMAccountName: instead.
> If you wnt to use UPN that value is called userPrincipalName: and it is
> formatted as loginid@domain.com
>
>

Re: Binding to a user principal name in ad by GT

GT
Sun Aug 21 18:35:05 CDT 2005

This link may help you:
http://www.rlmueller.net/NameTranslateFAQ.htm#What%20is%20NameTranslate

-GT
"Lost..." <Lost@discussions.microsoft.com> wrote in message
news:E1E10512-15E4-44F7-9AED-39D82A6531C9@microsoft.com...
> Thanks, so is there a way to bind to samAccountName instead of the display
> name?
>
> "rwh@rodharrison.com" wrote:
>
>> I believe you are thinking of sAMAccountName: instead.
>> If you wnt to use UPN that value is called userPrincipalName: and it is
>> formatted as loginid@domain.com
>>
>>