Skip to main content
Connect Azure DevOps to Yasu with a Personal Access Token (PAT). Yasu uses this token to register pull request webhooks (Service Hooks) on the repositories you select, and to post the cost-impact analysis back to each PR as a comment and a status check. Comments and the status badge are authored by whichever user owns the PAT, so we recommend creating a dedicated service-account user (for example, Yasu Bot) rather than using a personal account. For Microsoft’s reference, see the Azure DevOps personal access tokens docs.

Prerequisites

Before you start, make sure:
  • You use Azure DevOps Services (https://dev.azure.com/your-org).
  • You can create (or already have) a user with access to the projects whose pull requests you want analyzed.
  • That user can create a Personal Access Token in your organization.
By default, comments on your PRs appear under the name of the user who owns the PAT. Using a dedicated service-account user keeps Yasu’s comments under a clear bot identity instead of a teammate’s name.

Permissions Yasu requests

Yasu asks for a PAT with the minimum scopes needed to analyze pull requests and post results. Create the token with exactly these four scopes:
What this token cannot do. These scopes are read- and comment-only. A leaked PAT cannot push code, delete branches, force-merge or complete pull requests, change repository settings, or modify pipelines — it can only read code, post PR comments, and post the status check.
If your PAT screen doesn’t show Pull Request Threads as its own checkbox, expand Custom defined → Show all scopes. As a fallback, Code (Read & write) plus Code (Status) also works.

Steps

1

Create a service-account user (recommended)

  1. In Azure DevOps, open Organization settings → Users.
  2. Add a new user with a display name like Yasu Bot.
  3. Grant it access to the projects whose pull requests you want analyzed.
You can skip this step and use your own account, but PR comments will then appear under your name.
2

Create a Personal Access Token

  1. Sign in to Azure DevOps as the user that will own the token.
  2. Click the user-settings (gear) icon in the top-right header and choose Personal access tokens.
  3. Click New Token and set:
    • Name: Yasu
    • Organization: the organization you want to connect
    • Expiration: choose a date that matches your security policy
    • Scopes: select the four scopes from Permissions Yasu requests
  4. Click Create.
  5. Copy the token immediately and store it somewhere safe.
Azure DevOps shows the token value only once. If you lose it, create a new token.
3

Connect Azure DevOps in Yasu

  1. In Yasu, go to Integrations → Azure DevOps.
  2. Enter your Organization URL (https://dev.azure.com/your-org) and paste the PAT.
  3. Click Validate, then Connect.
Yasu validates the token and lists the projects it can access.
4

Select repositories

  1. Choose the projects and repositories you want Yasu to monitor.
  2. Save the configuration.
Yasu registers the required pull request Service Hooks on those repositories so new and updated PRs are analyzed automatically.
5

Verify a pull request analysis

  1. Open a pull request in one of the selected repositories.
  2. Wait for the webhook to reach Yasu.
  3. Confirm that Yasu posts a cost-impact comment and a status check, and that the PR appears on the PR Analysis page in Yasu.
You can also mention @yasu in a PR comment to ask a follow-up question about the change.

What Yasu does with this access

Once connected, Yasu:
  • registers Service Hooks for pull request events on the repositories you selected;
  • reads the PR diff and affected files to estimate the monthly cloud cost impact of the change;
  • posts a cost-impact comment and a status check on the PR;
  • responds to @yasu mentions in PR comments;
  • shows every analyzed PR on the PR Analysis page in the Yasu dashboard.
Yasu never pushes code, completes or abandons pull requests, or changes repository or pipeline settings.

Troubleshooting

Check that:
  • the Organization URL is https://dev.azure.com/your-org (not a project or repo URL);
  • the token has not expired or been revoked;
  • the token was created for the same organization you entered;
  • the token has the four scopes listed above (at minimum Project and Team → Read so Yasu can list projects).
Usually the token is missing a scope. Confirm:
  • Pull Request Threads → Read & write (for the comment), and
  • Code → Status (for the status check).
If Pull Request Threads isn’t a separate checkbox, use Code (Read & write) plus Code (Status). Recreate the token with the correct scopes, reconnect, and open or update the PR again.
Comments are authored by the user who owns the PAT. Create a dedicated service-account user (for example Yasu Bot), generate the PAT as that user, and reconnect so comments appear under the bot identity.
Yasu can only see projects the token owner can access. Grant the service-account user access to the project in Organization settings → Users, then reconnect or refresh the repository list.