Search code examples
azure-devopsazure-devops-rest-apiazure-devops-extensions

how to get current team id in the newer azure-devops-extension-sdk package


In the older building devops extensions examples I have found online it was possible to use VSS.getWebContext(); to get some information about the current project and selected team when creating an extension that adds a tab to the backlog area.

However there is no longer such a method with the newer SDK. So is it still possible to figure out what my current selected team is?


Solution

  • It looks like in the context that I need to get the team ID it can actually be gotten from the new SDK.

    After init if I perform the following config.team has both the team id and team name available.

    const config = SDK.getConfiguration();
    const teamname = config.team.name;