Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to return autodiscover LegacyDN #639

Closed
rodrigues8 opened this issue Sep 11, 2019 · 4 comments
Closed

Option to return autodiscover LegacyDN #639

rodrigues8 opened this issue Sep 11, 2019 · 4 comments

Comments

@rodrigues8
Copy link

Hello, first I would like to thank you for lib which is a great job. I would like to provide a recommendation, I work at an email provider and am developing something to look for legacydn accounts to update at another provider. But the autodiscover option does not have a feature today that returns this information. Looking a lot in lib I identified that there is a private function in autodiscover.py called _get_response inside the content of the variable r that is returned can already find the legacy.

thanks for everything

@ecederstrand
Copy link
Owner

ecederstrand commented Sep 12, 2019

Thanks for the suggestion! I'm rewriting the autodiscover logic currently, but progress is slow. I'll take the LegacyDN value into account.

In general, I think it's time that we handle all autodiscover attributes that are returned. #636 also requires some autodiscover values that we don't currently support.

More details of legacy DN here: https://www.enowsoftware.com/solutions-engine/bid/151745/The-Attribute-the-Myth-the-legacyExchangeDN

@rodrigues8
Copy link
Author

First thank you very much for the reply! Yesterday I was continuing my legacyDN search project and came up with a new suggestion, currently in lib it is not possible to add a default config for the "discover ()" function, if it had this option would be interesting because imagine the following case:

A client has migrated from one provider to another but has forgotten to fetch legacysDN and has already changed its DNS entries, with a config created along with legacy provider information would already be able to fetch autodiscover information (including legacyDN).

Thank you for your attention!

@ecederstrand
Copy link
Owner

I don't think I can implement this properly with short notice, but you should be able to at least hack _parse_response() to parse this part of the autodiscover response and pull out what you want.

@ecederstrand
Copy link
Owner

This should be possible now. The full autodiscover response message is now available on the Account object as account.ad_response, and discover() will now return an ad_response object. The LegacyDN field is available as ad_response.user.legacy_dn.

dmcgee pushed a commit to dmcgee/exchangelib that referenced this issue Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants