title: Authenticating to Dynamics NAV for OData
body: <p>I'm trying to write a node.js script that uses a Dynamics NAV Odata feed. </p>
  
  <p>I have both a UserAccount/PW and a Web Services Access Key from my Dynamics NAV setup.</p>
  
  <p>I can't for the life of my find out how to properly authenticate, either by adding something in a header or by adding something in the URL query. I've tried using the 'username:password@server' format. I've tried encoding that as base64 and adding that in the Header for the 'Authentication' value.</p>
  
  <p>The <a href="https://msdn.microsoft.com/en-us/library/jj551746(v=nav.90).aspx" rel="noreferrer">documentation itself</a> is incredibly non-specific. I know how to generate the key, but I don't know how to properly send that key to NAV to authenticate.</p>
  
  <p>I'm using the 'request-promise' npm package, which takes an 'options' argument that I can add arbitrary header key:value pairs into. Please someone give me some direction about how to authenticate to NAV. I've been on this for hours.</p>