title: Add member to distribution group using Azure AD API
body: <p>I want to add a member to a <strong>distribution list</strong>. As apparently I can't do this using Microsoft Graph, I am trying to use Azure AD Graph API. I am using Node.js.</p>
  
  <p>I am able to connect to Azure using the adal-node library. I get a token back, send requests, and get responses. (I can list groups, users, etc.).</p>
  
  <p>I am following the <a href="https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/groups-operations#AddGroupMembers" rel="nofollow noreferrer">Add Members documentation</a>, but I am confused.</p>
  
  <ol>
  <li><p>In the URL, is <code>object_id</code> the <code>id</code> of the Group to witch I want to add the member?</p></li>
  <li><p>For <code>myorganization</code>, I am using the <code>tennant_id</code>.</p></li>
  <li><p>Where do I specify the user data? Should I pass that in the <code>POST</code>? If so, whats' the format?</p></li>
  <li><p>What is the <code>$links</code> in the URL?</p></li>
  </ol>
  
  <p>Currently, I am doing this:</p>
  
  <pre><code>request.post(
    "https://graph.windows.net/TENNANT_ID_HERE/groups/GROUP_ID_HERE/$links/members?api-version=1.6",
    {
      headers: {
        Authorization: "Bearer " + TOKEN_HERE,
        "Content-Type": "application/json"
      },
      form: { key: "value" } //should I put my user object here?
    },
    function(err, res, body) {
      if (err) {
        console.log("err: " + err);
      } else {
        console.log("res: " + JSON.stringify(res, null, 3));
      }
    }
  );
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>{
    "odata.error": {
      "code": "Request_BadRequest",
      "message": {
        "lang": "en",
        "value":  "A supported MIME type could not be found that matches the 
                  content type of the response. None of the supported type(s) 'application/xml, text/xml, 
                  application/json;odata=minimalmetadata;streaming=true, application/json;odata=minimalmetadata;
                  streaming=false, application/json;odata=minimalmetadata, 
                  application/json;odata=fullmetadata;streaming=true, 
                  application/json;odata=fullmetadata;streaming=false, 
                  application/json;odata=fullmetadata, 
                  application/json;odata=nometadata;streaming=true, 
                  application/json;odata=nometadata;streaming=false, 
                  application/json;odata=nometadata, 
                  application/json;streaming=true, 
                  application/json;streaming=false, 
                  application/json;odata=verbose, 
                  application/json' 
                  matches the content type 'application/x-www-form-urlencoded'."
      }
    }
  }
  </code></pre>