title: TFS 2015 REST API Authentication
body: <p>We are trying to invoke the TFS 2015 REST API's from a web-page using Javascript and have a challenge in establishing valid authentication with the TFS server. </p>
  
  <p>We do not know how to generate a personal access tokens or an OAuth access tokens. The instruction below seem to apply more toward VSO than on-premise TFS. 
  <a href="https://www.visualstudio.com/en-us/integrate/get-started/rest/basics" rel="noreferrer">https://www.visualstudio.com/en-us/integrate/get-started/rest/basics</a></p>
  
  <p>How can I generate an authentication key/token?  </p>
  
  <p>UPDATE: As on Mar 2017, the latest release of On-Prem TFS supports creating personal access tokens for all users. Using the below javascript code by @Elmar you can make requests to update, edit TFS workitems from REST API. </p>