Link to home
Start Free TrialLog in
Avatar of Member_2_4694817
Member_2_4694817

asked on

Determine Outlook web address URLs from Username

I need to guess the URL to folders in a user's Outlook Web Access given info about the user from Active Diredtory via LDAP.
This sounds simple at first, as it should be
https://(servername)/exchange/(username)/(foldername)
However, I seem to be unable to determine the really working username.
My best guess so far has been the part after "cn=" of the LDAP attribute "legacyExchangeDN".
But I do have a few users where this fails.
These seem to suggest that I should extract the username form some "proxyAdresses", but this does not work relyably for everyone, either.
There must be a "right" thing to do it, I hope!?
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

last part of LegacyExchangeDN is the MailNickName attribute and not proxyaddress.
Avatar of Member_2_4694817
Member_2_4694817

ASKER

Sorry to correct: I *do* have entries with
mailNickname != last part of legacyExchangeDN
and more to the point, neither
https://(servername)/exchange/(mailNickname)/(foldername)
nor
https://(servername)/exchange/(last part of legacyExchangeDN)/(foldername)
are always suitable URLs for my intended purpose.
I have a user with the following anonymized output from ldapsearch:

# Wyyy Sxxxx, Bbbb, Benutzer, zzzzzzz.local
dn: CN=Wyyy Sxxxx,OU=Bbbb,OU=Benutzer,DC=zzzzzzz,DC=local
initials: WLZ
displayName: Wyyy, Sxxxx
proxyAddresses: x400:c=DE;a= ;p=ZZZZ;o=Bbbb;s=Wyyy;g=Sxxxx;
proxyAddresses: smtp:wyyy@bbbb.zzzzzzz.de
proxyAddresses: X400:c=DE;a= ;p=ZZZZ;o=Bbbb;s=Wyyy;g=Sxxxx;i=WLZ;
proxyAddresses: smtp:Sxxxx.Wyyy@zzzzzzz.de
proxyAddresses: SMTP:wyyy@zzzzzzz.de
mailNickname: wyyy
sAMAccountName: Wyyy
legacyExchangeDN: /o=ZZZZ/ou=Bbbb/cn=Recipients/cn=swyyy

For this user
https://(servername)/exchange/wyyy/(foldername)  does not work
https://(servername)/exchange/swyyy/(foldername)  does not work
https://(servername)/exchange/Sxxxx.Wyyy/(foldername)  works



for OWA we would require the Displayname after the
https://(servername)/exchange/Sxxxx.Wyyy/(foldername)
for eg Sxxxx.Wyyy is the display name
If the issue is resolved can close the issue and distribute the points...... :-)
Any updates ?
Any updates on the issue ?
Any updates on the issue ?
Sorry for being away for a while.
While Rancy is correct that the URL
https://(servername)/exchange/Sxxxx.Wyyy/(foldername)
works, it should be mentioned that "Sxxxx.Wyyy" is not the displayName - the displayName is "Wyyy, Sxxxx".
Also, replacing "foo, bar" with "bar.foo" seems not to work in 100% of all cases (not to mention problems with possible special chars in the parts or what to do if displayName has no comma).
Hence the riddle is still unsolved - given complete LDAP info, determine tha name üpart of the OWA URL
Could you please be more informative as to what works and what does not and ideally i havn't seen user name having "Special Characteristics" in them as it causes a lot of problems at times.
The problem is that *I* cannot find *any* LDAP attribute that works 100%, but I hoped that *someone* had to know - after all I do not expect the OWA server to perform magic, but rather follow some obscure algorithm. Could there be something like a "hidden" LDAP attribute?

The example in post #24431421 essentially listed my poor attempts to guess what could work - from using OWA under a few user accounts and checking what the URLs look like: mailNickname, samAccountname and the last part of legacyExchangeDN *seemed* to be better and better approximations aof the real target. However, for that specific user only *a* (but which a priori?) proxyAddress seemes to match (as found by ldapserach | grep Sxxx.Wyyy). Unfortunately, it turned out that neither the first listed procxyaddress (of type smtp) nor the main (i.e. SMTP) address worked. In other words, I'm at a loss ...
ASKER CERTIFIED SOLUTION
Avatar of ee_auto
ee_auto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial