Azure DevOps Integration

Connect Otto to Azure DevOps to create pull requests and respond to code reviews. Otto uses a service principal (application identity) to access your Azure DevOps organization.

Prerequisites

Before connecting, you need:

  1. An Azure DevOps organization
  2. Admin access to your Azure DevOps organization settings (to add the service principal)
  3. Your Azure AD Tenant ID (found in Azure Portal → Microsoft Entra ID → Overview)

Connecting Azure DevOps

Step 1: Add Otto's Service Principal to Azure DevOps

  1. In Azure DevOps, go to Organization Settings → Users → Add users
  2. Search for Otto's service principal by app name or client ID
  3. Set access level to Basic
  4. Add the service principal to relevant projects as Contributor

Step 2: Connect in Otto

  1. Go to Settings → Integrations in your Otto dashboard
  2. Click Connect on the Azure Repos card
  3. Enter your Azure DevOps organization name (from https://dev.azure.com/your-org-name)
  4. Enter your Azure AD Tenant ID
  5. Click Connect

Otto validates access to your organization and automatically creates webhook subscriptions for PR events.

How Otto Uses Azure DevOps

Creating Branches

When Otto starts work on a work item, it:

  1. Creates a new branch from your default branch
  2. Branch name: otto/[work-item-id]-[slug]
  3. Example: otto/1234-add-user-avatar

Making Commits

Otto commits changes with:

  • Clear commit messages describing the change
  • Linked work items in commit messages
  • Co-authored attribution when responding to feedback

Opening Pull Requests

Otto's PRs include:

  • Descriptive title matching the work item
  • Summary of changes
  • Link to the Jira or Azure DevOps work item
  • Implementation notes
  • Test instructions (if applicable)

Responding to Reviews

When you leave review comments, Otto:

  1. Reads the feedback
  2. Makes the requested changes
  3. Pushes a new commit
  4. Responds to the comment with a summary

Webhook Events

Otto automatically subscribes to these Azure DevOps events:

EventDescription
PR createdNew pull request opened
PR updatedPull request modified
PR commentComment added to pull request

Required Permissions

The Otto service principal needs these permissions in your Azure DevOps organization:

PermissionPurpose
Code (read/write)Read code, create branches, push commits
Pull requests (read/write)Create and update pull requests
Work items (read/write)Link PRs to work items
Identity (read)Access user and team information

Best Practices

Start with a Test Project

Initially, give Otto access to a test repository to validate your configuration before expanding to production repos.

Use Branch Policies

Always require PR reviews and build validation before completing PRs from Otto.

Enable CI/CD Pipelines

Set up automated tests and deployment pipelines that run on Otto's PRs to catch issues early.

Work Item Linking

Ensure work items are properly linked in PRs for traceability and audit purposes.

Team-Specific Agents

If you have multiple teams or products, create separate agents with team-specific context for better results.

Troubleshooting

"Failed to validate access"

The service principal has not been added to your Azure DevOps organization, or it lacks sufficient permissions.

Fix: Go to Azure DevOps → Organization Settings → Users → Add users, search for Otto's service principal, and grant Basic access level.

"Tenant ID not found" or token acquisition error

The Tenant ID may be incorrect.

Fix: In the Azure Portal, navigate to Microsoft Entra ID → Overview and copy the Tenant ID value.

Webhook subscriptions not created

Otto creates webhook subscriptions automatically during connection. If they fail, Otto will still connect but won't receive PR events.

Fix: Disconnect and reconnect the integration, or contact support.