0

i'm building an electron app that connect to a TFS server and retrieve some data from it. They use Windows credential to access TFS , how can i connect to TFS using Windows credential through chrome or node.js ?

i tried this code but give me 401 : unauthorized

$.ajax({
                url: 'https://tfs.myserver.com:8090/tfs/IKM.TPC.Projects/MR/_workitems',
                type: 'GET',
                dataType: 'json',
                xhrFields: {
                    withCredentials: true
                }
                })
                .done(function (data) {
                    $('#result').text(data);
                })
                .fail(function (jqXHR, textStatus, errorThrown) {
                    $('#result').text(textStatus);
                });
j.kherfan
  • 40
  • 10

1 Answers1

0

Simple steps:

  1. Create a login page to let user login with username and password
  2. Store username and password in a variable, cookie or local storage
  3. Send the request by using httpntml with username, password, domain
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53