microsoft / microsoft/vscode

Semantic search / workspace indexing returns "Unauthorized" for Azure DevOps repo after successful Microsoft account sign-in

Open
#325,107 2 comments 0 reactions 1 assignee Claimed by @TylerLeonhardt View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Environment
- VS Code version: 1.128.0 (commit fc3def6774c76082adf699d366f31a557ce5573f), arm64
- OS: macOS (Darwin 25.5.0)
- Repository host: Azure DevOps (visualstudio.com / dev.azure.com), work/org account (AAD)
- Copilot license: GitHub account with an org-provided Copilot Business subscription
- Semantic index auth: separate Microsoft account sign-in (AAD), triggered from within VS Code

## Description
Copilot's workspace-context semantic search feature fails to retrieve the indexing status for an Azure DevOps repository, logging repeated `Unauthorized` errors:

```
2026-07-09 10:38:51.016 [error] CodeSearchChunkSearch::getIndexedStatus(/). Failed to fetch indexing status. Unauthorized.
2026-07-09 10:38:51.020 [error] CodeSearchChunkSearch::getIndexedStatus(/). Failed to fetch indexing status. Unauthorized.
2026-07-09 10:38:51.070 [error] CodeSearchChunkSearch::getIndexedStatus(/). Failed to fetch indexing status. Unauthorized.
```

Per [the workspace-context docs](https://code.visualstudio.com/docs/agents/reference/workspace-context#_semantic-search), Azure DevOps repos are supported for remote indexing when signed in with a Microsoft account in VS Code. I confirmed:

- I use a GitHub account with an org-provided Copilot Business subscription as my Copilot license/identity.
- Clicking the Copilot icon in VS Code shows "Code Semantic Index - Not Authorized" with a "Sign in?" link.
- Clicking "Sign in?" prompts a separate Microsoft account sign-in flow (AAD, same tenant as the Azure DevOps organization) — screenshots of the full popup sequence attached.
- The sign-in completes successfully, but the three `Unauthorized` errors below appear in the log immediately afterward, and the semantic index status still does not resolve.
- Git operations against the same repo work correctly over HTTPS using Git Credential Manager with the same Microsoft account (OAuth flow), confirming my own repo permissions are valid at the git level.
- The Unauthorized errors persist even after fully restarting VS Code (not just reloading the window) and re-signing in.

## Steps to reproduce
1. Open a workspace backed by an Azure DevOps git repository, using GitHub Copilot (Business) as the license/identity.
2. Click the Copilot icon in VS Code; observe "Code Semantic Index - Not Authorized" with a "Sign in?" link.
Image

3. Click "Sign in?" and complete the Microsoft (AAD) account sign-in flow for an account that has access to the Azure DevOps organization.

Image

Image

4. Observe repeated `Unauthorized` errors in the Copilot log for `CodeSearchChunkSearch::getIndexedStatus`, occurring immediately after the successful sign-in.

## Expected behavior
Indexing status should be retrievable and the repository should be indexed for semantic search, per the documented Azure DevOps support.

## Actual behavior
Every `getIndexedStatus` call fails with `Unauthorized`, and no index appears to be built.

## Additional notes
- This behavior is observed after updating to the latest VS Code release (1.128.0) — noting this in case it correlates with a recent change to the workspace-context/semantic-search or auth flow.
- Unsure whether this is a client-side auth/session issue or requires an organization-level policy to be enabled for Copilot code search on Azure DevOps — happy to provide more logs or org details if useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.