I am trying to connect a JavaScript client with a TFS 2015 API to get some information and save it in my SQL Database, but I am having challenges establishing this connection with JavaScript. They are using Windows authorization.
I used this code but it didn't work:
$.ajax({
url: 'https://tfs........',
type: 'GET',
dataType: 'json',
xhrFields: {
withCredentials: true
}
})
.done(function (data) {
console.log(data);
})
.fail(function (jqXHR, textStatus, errorThrown) {
console.log(textStatus);
});
Can anyone help me please?