Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby client for Exchange Web Services
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib send_meeting_invitations shouldn't be an element of calendar_item
spec Fix coverage
.gitignore Refactored specs and added VCR cassettes
Gemfile Using bundler for development.
LICENSE Initial commit Refactored specs and added VCR cassettes
Rakefile Create default config files with rake config_prepare
exchanger.gemspec tzinfo is a runtime dependency. Fixes #7.
init.rb Initial commit


Continuous Integration status

Ruby library for accessing Microsoft Exchange using Exchange Web Services. This library tries to make creating and updating items as easy as possible. It will keep track of changed properties and will update only them.

Supported operations

  • FindItem, GetItem, CreateItem, UpdateItem, DeleteItem
  • FindFolder, GetFolder
  • ResolveNames, ExpandDL
  • GetUserAvailability


gem install exchanger


Exchanger.configure do |config|
  config.endpoint = ""
  config.username = "username"
  config.password = "password"

or configure from YAML



Creating and updating contacts

folder = Exchanger::Folder.find(:contacts)
contact = folder.new_contact
contact.given_name = "Edgars"
contact.surname = "Beigarts"
contact.email_addresses = [ => "EmailAddress1", :text => "") ]
contact.phone_numbers = [ => "MobilePhone", :text => "+371 80000000") ] # CreateItem operation
contact.company_name = "Example Inc." # UpdateItem operation
contact.destroy # DeleteItem operation

Searching in Global Address Book

mailboxes ="John")

Running specs with Exchange Server

The easiest way is to sign up for a Microsoft Office 365 free trial.

  1. Create a random calendar entry in July 2016
  2. Create a distribution list named 'Test'
  3. Create spec/config.yml with your Exchange credentials
  4. Create spec/fixtures/get_user_availability.yml with your Exchange email address
  5. Clear the recorded VCR cassettes by removing spec/cassettes
  6. Run the specs rake spec

It looks like Office 365 trial has some rate limits, so you may have to record the VCR cassettes for each spec separately.

  An internal server error occurred. Try again later.


Something went wrong with that request. Please try again.