Edit

Set up GitHub connector (OAuth or PAT) in Azure SRE Agent

Use the GitHub connector to connect github.com to your agent for managing issues, pull requests, and workflows. Configure the connector through Builder > Connectors in the portal.

Note

This tutorial covers the GitHub Connector for issue, PR, and workflow operations. For code context during investigations, see Connect source code. For GitHub Enterprise Cloud, see Connect GitHub Enterprise Cloud.

Prerequisites

  • An active agent in Running state
  • Access to github.com repositories you want the agent to use
  • Agent role: Administrator or Standard User

Open the GitHub connector setup

  1. Open your agent in the portal.
  2. Go to Builder > Connectors.
  3. Select Add connector.
  4. Select GitHub OAuth connector.

Choose an authentication method

Select one method:

Method When to use
OAuth Interactive setup for user-driven access
PAT Service account or non-interactive setup

OAuth flow

  1. Select OAuth.
  2. Select Sign in to GitHub.
  3. Complete the GitHub popup authorization.
  4. Confirm status shows Connected.

PAT flow

  1. Select PAT.
  2. Paste a GitHub token with required scopes.
  3. Select Connect.
  4. Confirm status shows Connected.

Confirm GitHub connector runtime operations

After saving the connector, test with a chat prompt:

List recent issues from owner/repo and summarize the top 3 risks.

Use a direct verification prompt as a final checkpoint:

Get me recent issues from owner/repo.

Required permissions by operation

Operation OAuth/PAT minimum
Read repository metadata/content repo for private repos (public_repo for public-only)
List or create issues Issue-capable repo access
Pull request operations PR-capable repo access

Troubleshoot connections

Symptom Likely cause Fix
Connector shows disconnected Token expired or revoked Re-authenticate OAuth or rotate PAT
Issue reads work, PR actions fail Missing PR permission Grant PR permission and retry
Connector can't access private repos Token scope too narrow Use repo scope for private repos
Popup doesn't open Browser popup blocked Allow popups for the portal domain

Next step