Coder Social home page Coder Social logo

Comments (8)

zenchild avatar zenchild commented on July 16, 2024

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.

zenchild avatar zenchild commented on July 16, 2024

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.

retorquere avatar retorquere commented on July 16, 2024

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.

retorquere avatar retorquere commented on July 16, 2024

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.

retorquere avatar retorquere commented on July 16, 2024

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.

retorquere avatar retorquere commented on July 16, 2024

Got it -- I passed the username as username\domain, but user@domain instead does the job.

from autodiscover.

retorquere avatar retorquere commented on July 16, 2024

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.

retorquere avatar retorquere commented on July 16, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.