How it works...
Azure DevOps (previously Team Foundation Server and Visual Studio Team Services) provides multiple API endpoints and services. The Projects API you used in this recipe belongs to the Core service. Also part of the Core service are Teams and Processes. These three components are at the core of your Azure DevOps experience.
In this recipe, you started by creating an access token. This token is required if you cannot use multi-factor authentication for your account, for example, because getting a Bearer token isn't easy. You used this personal access token with HTTP headers, more specifically with the Authorization header.
Next, you supplied the headers to Invoke-RestMethod to list your Azure DevOps resources, such as projects ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access