Search code examples
node.jsazure-devopstfs-sdkazure-pipelinesazure-pipelines-build-task

How to create work items using Visual Studio Team Services Client for Node.js (vso-node-api)?


I need to create VSTS work items using Visual Studio Team Services Client for Node.js (vso-node-api), Please provide any samples on this?


Solution

  • Use the token retrieved using vsts-task-lib

    import tl = require('vsts-task-lib/task');
    let auth = tl.getEndpointAuthorization("SYSTEMVSSCONNECTION", false);
    var token = auth.parameters["AccessToken"];