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.
Steps
1
Create a service-account user (recommended)
- In Azure DevOps, open Organization settings → Users.
- Add a new user with a display name like
Yasu Bot. - Grant it access to the projects whose pull requests you want analyzed.
2
Create a Personal Access Token
- Sign in to Azure DevOps as the user that will own the token.
- Click the user-settings (gear) icon in the top-right header and choose Personal access tokens.
- 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
- Name:
- Click Create.
- Copy the token immediately and store it somewhere safe.
3
Connect Azure DevOps in Yasu
- In Yasu, go to Integrations → Azure DevOps.
- Enter your Organization URL (
https://dev.azure.com/your-org) and paste the PAT. - Click Validate, then Connect.
4
Select repositories
- Choose the projects and repositories you want Yasu to monitor.
- Save the configuration.
5
Verify a pull request analysis
- Open a pull request in one of the selected repositories.
- Wait for the webhook to reach Yasu.
- Confirm that Yasu posts a cost-impact comment and a status check, and that the PR appears on the PR Analysis page in Yasu.
@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
@yasumentions in PR comments; - shows every analyzed PR on the PR Analysis page in the Yasu dashboard.
Troubleshooting
Yasu says the token is invalid
Yasu says the token is invalid
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).
I connected, but no comment or status appears on my PR
I connected, but no comment or status appears on my PR
Usually the token is missing a scope. Confirm:
- Pull Request Threads → Read & write (for the comment), and
- Code → Status (for the status check).
Comments appear under a teammate's name
Comments appear under a teammate's name
A repository or project is missing from the list
A repository or project is missing from the list
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.
Yasu Bot), generate the PAT as that user, and reconnect so comments appear under the bot identity.