Comments (8)
It's returning nil because nothing is resolving. I'm not hung up on this being the correct way to do it but that is the reason you are getting a nil result.
from autodiscover.
I just pushed up a change to master that adds a simple logger. You can include it with require "autodiscover/debug"
after you've required autodiscover
.
from autodiscover.
It looks like it does resolve, it's just that the first attempt fails for certificate problems rather than the domain not responding (see http://is.gd/TxGOi1)
from autodiscover.
My script is currently this:
#!/usr/bin/env ruby
require 'dotenv/load'
require 'autodiscover'
require "autodiscover/debug"
client = Autodiscover::Client.new(email: ENV['EMAIL'], password: ENV['PASSWORD'], username: ENV['USER'])
data = client.autodiscover(ignore_ssl_errors: true)
if data.nil?
puts 'no response'
exit
end
puts data.ews_url
puts data.exchange_version
puts data.response
and the output is
DEBUG Autodiscover::PoxRequest : Yielding HTTPS Url https://han.nl/autodiscover/autodiscover.xml
DEBUG Autodiscover::PoxRequest : Yielding HTTPS Url https://autodiscover.han.nl/autodiscover/autodiscover.xml
DEBUG Autodiscover::PoxRequest : Yielding HTTP Redirected Url https://autodiscover.han.nl/autodiscover/autodiscover.xml
no response
from autodiscover.
I've tried the same account on testconnectivity.microsoft.com, and I'm getting a positive result on https://autodiscover.han.nl:443/Autodiscover/Autodiscover.xml .
from autodiscover.
Got it -- I passed the username as username\domain
, but user@domain
instead does the job.
from autodiscover.
Yet on another system, I'm getting the old problem again (same script from above):
DEBUG Autodiscover::PoxRequest : Yielding HTTPS Url https://han.nl/autodiscover/autodiscover.xml
DEBUG Autodiscover::PoxRequest : Yielding HTTPS Url https://autodiscover.han.nl/autodiscover/autodiscover.xml
DEBUG Autodiscover::PoxRequest : Yielding HTTP Redirected Url https://autodiscover.han.nl/autodiscover/autodiscover.xml
no response
from autodiscover.
I've enabled debug logging on the embedded httpclient, this is what it shows: https://gist.github.com/eb32d9a02d297191118f55b870ede466
from autodiscover.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autodiscover.