Skip to content

Azure DevOps Integration

Comprehensive Azure DevOps integration for pull requests and work items.

C# Dev Tools integrates with Azure DevOps, providing pull request management and collaboration features.

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type “Pull Request Manager: Open Connection Manager”
  3. Click “Add Connection”
  4. Select “Azure DevOps”
  5. Choose authentication method:
    • OAuth (Recommended): Uses VS Code’s built-in Microsoft authentication
    • Personal Access Token: Manual token configuration
  6. For OAuth:
    • Enter organization and project name
    • Click “Create OAuth Connection”
    • Authenticate through VS Code’s secure authentication flow
  7. For PAT:
    • Enter organization name, project name, and Personal Access Token
    • Save connection

OAuth provides the most secure and convenient authentication:

  1. Select “OAuth” as authentication method
  2. VS Code will prompt you to sign in to Microsoft
  3. Authorize the application to access Azure DevOps
  4. Connection is automatically configured with secure token management

Benefits:

  • No need to create or manage tokens manually
  • Automatic token refresh
  • Integrated with VS Code’s secure credential storage
  • Easy revocation through Azure DevOps security settings

For scenarios requiring PAT authentication:

  1. Go to Azure DevOps → User Settings → Personal Access Tokens
  2. Click “New Token”
  3. Set scopes:
    • Code (Read, write, & manage)
    • Work Items (Read & write)
  4. Create and copy token
  5. Paste token in connection configuration

Pull requests are organized by:

  • Organization
  • Project
  • Repository

View PRs by:

  • Assigned to me
  • Created by me
  • Review requested
  • All pull requests

Create PR in Azure DevOps:

  1. Push branch to Azure Repos
  2. Click “Create Pull Request”
  3. Fill in:
    • Title
    • Description
    • Target branch
    • Reviewers
    • Work items (optional)
  4. Create PR

Link related work items:

  1. Search for work items
  2. Select items to link
  3. PR is associated with work items
  4. Work items show PR link

View comprehensive PR information:

  • Title and description
  • Source and target branches
  • Changed files and commits
  • Comments and discussions
  • Review status
  • Build and pipeline status
  • Linked work items

Review code changes:

  1. View file diffs
  2. Add inline comments
  3. Reply to discussions
  4. Approve or wait for author

Azure DevOps voting system:

  • Approve: PR looks good
  • Approve with suggestions: Minor changes suggested
  • Wait for Author: Changes requested
  • Reject: Major issues found

Azure DevOps supports:

  1. Merge (no fast-forward): Standard merge
  2. Squash commit: Single commit
  3. Rebase and fast-forward: Linear history
  4. Semi-linear merge: Merge with rebase

Respect policies:

  • Minimum number of reviewers
  • Required reviewers
  • Build validation
  • Work item linking
  • Comment resolution

View build status:

  • Pipeline results
  • Build checks
  • Test results
  • Quality gates

Manage associated work items:

  • View linked items
  • Update work item status
  • Add new work items
  • Complete items with PR merge

Respect configured policies:

  • Required reviewers
  • Build validation
  • Work item linking
  • Comment resolution
  • Merge strategy

Permission-based features:

  • View: Read pull requests
  • Contribute: Create and comment
  • Complete: Merge pull requests
  • Admin: Policy management
  • Link work items to PRs
  • Follow branch policies
  • Use appropriate merge types
  • Complete work items with merge
  • Ensure builds pass before merge
  • Resolve all comments

If Azure DevOps authentication fails:

For OAuth connections:

  1. Verify organization name is correct
  2. Check project name
  3. Sign out and sign back in to VS Code’s Microsoft account
  4. Check Azure DevOps permissions for your Microsoft account
  5. Try recreating the OAuth connection

For PAT connections:

  1. Verify organization name is correct
  2. Check project name
  3. Verify PAT permissions
  4. Regenerate token if expired

If PRs don’t appear:

  1. Check organization access
  2. Verify project permissions
  3. Refresh PR list
  4. Check network connectivity

If merge fails:

  1. Check branch policies
  2. Ensure all checks pass
  3. Verify reviewer approvals
  4. Resolve all comments
  5. Check permissions