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

401 Unauthorized #28

Closed
jkottapa opened this issue Oct 20, 2016 · 4 comments
Closed

401 Unauthorized #28

jkottapa opened this issue Oct 20, 2016 · 4 comments

Comments

@jkottapa
Copy link

jkottapa commented Oct 20, 2016

First of all, this is an amazing library. Very thankful to all the authors.

So I have a Exchange 2013_SP1 server setup and I am testing failure cases. If I add a configuration with incorrect credentials. It goes in a loop and never returns (at least after 10mins). How do I restrict the number of retries before giving up, especially for the case for incorrect credentials.

@ecederstrand
Copy link
Owner

Thanks for the kind words!

This was answered in more depth in #16. In short, it's not possible to distinguish between a temporarily malfunctioning EWS service and incorrect credentials. If you do need immediate failures, version 1.7.0 introduced the is_service_account=False attribute to the Credentials model which should work in your case.

@jkottapa
Copy link
Author

Fantastic!

That does the trick. Thanks a lot.

@MartinThoma
Copy link
Contributor

is_service_account seems to no longer exist in Credentials. How can I prevent the endless loop now?

@ecederstrand
Copy link
Owner

is_service_account is deprecated in favour of two credentials classes, Credentials and ServiceAccount. The former enables fail early, the latter enables backoff and retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants