Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-ews

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by36.62%
Maintainers
1
Weekly downloads
 
Created
Source

node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API
npm install node-ews
About

A collobberation of node-soap and httpntlm wrapped up with some modifications to make queries to Microsoft's Exchange Web Service API work. I'm actually surprised this works...

Features:
  • Assumes NTLM Authentication over HTTPs
  • Connects to configured EWS Host and downloads appropriate wsdl file so it might be concluded that this is "fairly" version agnostic
  • Dynamically exposes all EWS SOAP functions in the downloaded wsdl file
  • Attempts to standardize Microsoft's wsdl by modifying the file to include missing components
Known Issues / Limits / TODOs:
  • Depends on a modified fork of the soap-ntlm fork of node-soap. This is located in this repository.
  • Downloads to temporary location the wsdl and xsd files on each call of ews.run()
  • Returned json requires a lot of parsing. Probably can be optimized to remove common parent elements to the EWS responses or dynamically filter based on query.
  • Outside of the example below, nothing has been tested (aka "production ready!")
Example 1: Get Exchange Distribution List Members Using ExpandDL
https://msdn.microsoft.com/EN-US/library/office/aa564755.aspx
var ews = require('node-ews');
var _ = require('lodash');

// exchange server connection info
var username = 'myuser@domain.com';
var password = 'mypassword';
var ewsHost = 'ews.domain.com';

// exchange ews query on Public Distribution List by email
var ewsFunction = 'ExpandDL';
var ewsArgs = {
  'Mailbox': {
    'EmailAddress':'publiclist@domain.com'
  }
};

// setup authentication
ews.auth(username, password, ewsHost);

// query ews
ews.run(ewsFunction, ewsArgs, function(err, result) {
  if(err) throw err;

  // parse JSON results to dump email addresses for DL to console
  var requestResult = result['Envelope']['Body'][0]['ExpandDLResponse'][0]['ResponseMessages'][0]['ExpandDLResponseMessage'][0]['DLExpansion'][0]['Mailbox'];
  _.map(requestResult, 'EmailAddress').forEach(function(x) {
    console.log(x[0]);
  });
});

Keywords

FAQs

Package last updated on 30 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc