how to get the DN(distinguish name)
In the interface EcDoConnectEx,the parameter szUserDN is in the form of "/0=Microsoft/OU=Site1/cn=Recipient/cn=John", my question is that How could I get the string by the exchange protocol. I mean that How can I get the string by calling some interface. Could anyone tell me which interface to call , in which protocol doc?
Now I obtained the string by finding the string in the address book in my MS Outlook,and then hard coding into the program,but that is not feasible.
Thank you in advanced!
Answers
Jacob Huang,
Please refer to this MSDN Article entitled “Getting User Settings”: http://msdn.microsoft.com/en-us/library/dd633650.aspx.
Your questions are more development/implementation centered, therefore your questions would probably be better answered on this forum:
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads [Development on TechNet]
In review of your question I have filed a request to possibly add some addition content in [M-OXPROTO] to cover your use case of discovering the distinguished name (DN).
Dominic Michael Salemno
Senior Support Escalation Engineer
US-CSS DSC Protocols Team
- Proposed As Answer byDominic Salemno MSFTMSFT, ModeratorMonday, October 26, 2009 4:53 PM
- Marked As Answer byChris MullaneyMSFT, OwnerWednesday, November 18, 2009 7:21 PM
All Replies
- The user's DN is also stored in Active Directory as part of the user account. The property you want is legacyExchangeDN. That's probably the easiest way.
- Hi JacobHuang:
I have alerted Protocol Documentation Team regarding your question about distinguish name. A member of the team will be in touch soon.
Regards, Obaid Farooqi - Jacob,
This is done using the NSPI interface (which basically makes sense - its the name service, and you're looking for user name information). Check the MS-NSPI spec.
In MS-NSPI, I'd suggest starting with Section 4, then reading section 3, then the applicable bits of Section 2 for whichever opnums you need to use.
HTH.
Brad- Proposed As Answer byBrad Hards Wednesday, October 21, 2009 2:33 PM
Jacob Huang,
Are you merely trying to obtain the string representation of the distinguished name (DN)? Or are you trying to change the DN?
Dominic Salemno
Senior Support Escalation Engineer- I am trying to obtain the string representation of the distinguished name (DN),which is use in the EcDoConnectEx call.
thank you ! - Thank you!
In the section 4,It said "It is assumed that the messaging client has established an RPC connection to the NSPI server", could you please tell How to connect to the NSPI server? By calling some interface?
:-) - Thank you !I will try your method!
- Would you please tell how to get the property from the AD, if possible a Demo will be appreciated.It's better in C++.
Or could you please recommend some website and other resources that is a guide.
I have view the "Retrieving a Legacy Exchange Distinguished Name with ADSI " in http://msdn.microsoft.com/en-us/library/ms992523(EXCHG.65).aspx, however, when I compile it ,there is something wrong:"Expression is of type 'ActiveDs.IADs', which is not a collection type." Could anyone tell how to translate the code into C++.
Thank you in advanced! Jacob Huang,
Please refer to this MSDN Article entitled “Getting User Settings”: http://msdn.microsoft.com/en-us/library/dd633650.aspx.
Your questions are more development/implementation centered, therefore your questions would probably be better answered on this forum:
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads [Development on TechNet]
In review of your question I have filed a request to possibly add some addition content in [M-OXPROTO] to cover your use case of discovering the distinguished name (DN).
Dominic Michael Salemno
Senior Support Escalation Engineer
US-CSS DSC Protocols Team
- Proposed As Answer byDominic Salemno MSFTMSFT, ModeratorMonday, October 26, 2009 4:53 PM
- Marked As Answer byChris MullaneyMSFT, OwnerWednesday, November 18, 2009 7:21 PM
- Dominic,
If you want to see how the OpenChange project does it, you can look at our code for mapiprofile.c and IProfAdmin.c. You may not be able to use it directly (because we assume some underlying DCE RPC functionality from the Samba project, but you should still be able to get the idea.
http://websvn.openchange.org/filedetails.php?repname=openchange&path=%2Ftrunk%2Futils%2Fmapiprofile.c
http://websvn.openchange.org/filedetails.php?repname=openchange&path=%2Ftrunk%2Flibmapi%2FIProfAdmin.c
Brad- Proposed As Answer byBrad Hards Monday, October 26, 2009 10:12 PM


