What is called this format? "/ o = First organization / ou = First administrative group / cn = Recipients / cn = user"

In what format is the following line related to Microsoft Exchange used?

/o=First Organization/ou=First Administrative Group/cn=Recipients/cn=user 

I saw this with LDAP, but now I see its CDO 1.2.1 and am ultimately trying to convert it to an email address, for example user@domain.com . Thanks.

+6
source share
2 answers

It is called the legacy Exchange distinguished name and is a remainder of Exchange 5.5.

You can resolve this address using the ResolveNames method (http://msdn.microsoft.com/en-us/library/exchangewebservices.exchangeservicebinding.resolvenames(v=exchg.140).aspx) of the EWS managed API, call the EWS WebService ResolveName method directly.

Another option is to use LDAP and search for a user object with the legacyExchangeDN parameter set to your address. Then request the proxyAddress attribute and get a single address with the prefix "SMTP:" (all in uppercase).

+5
source

The Henning link method has been deprecated since Exchange 2013.

Now it is recommended to use ExchangeService.ResolveName () and get the STMP address from the Mailbox property.

 public string ResolveToSmtpAddress(string address) { try { NameResolutionCollection nrc = _service.ResolveName(address); foreach (var add in nrc) { return add.Mailbox.Address; } return null; } catch (Exception) { throw; } } 
+2
source

Source: https://habr.com/ru/post/896991/


All Articles