You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced Troubleshooting Documentation for Dev Container and WSL Authentication Issues (#401)
This PR enhances the troubleshooting documentation by adding guidance
for resolving authentication issues in Dev Container and WSL
environments, expanding on the existing multi-tenant authentication
troubleshooting section.
**Changes Made**
- Enhanced Multi-Tenant Authentication Section: Added detailed
configuration examples for both public feed and source installations
with tenant ID support
- New Dev Container/WSL Authentication Section: Added comprehensive
troubleshooting guidance for authentication issues specific to Dev
Container and WSL environments
## GitHub issue number
#398 - Documentation: clarify troubleshooting document for multi-tenant
setup and add section on WSL/User global settings
## **Associated Risks**
Documentation update only
## ✅ **PR Checklist**
- [x] **I have read the [contribution
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)**
- [x] **I have read the [code of conduct
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)**
- [x] Title of the pull request is clear and informative.
- [x] 👌 Code hygiene
- [ ] 🔭 Telemetry added, updated, or N/A
- [x] 📄 Documentation added, updated, or N/A
- [ ] 🛡️ Automated tests added, or N/A
## 🧪 **How did you test it?**
The described approach is the one I had to take to make the ADO MCP work
in WSL and Dev Container (while keeping the settings at global User
level), and could be useful to help others troubleshooting a root cause
that might be confusing to discover at first.
Copy file name to clipboardExpand all lines: docs/TROUBLESHOOTING.md
+70-1Lines changed: 70 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,35 @@ The MCP server may be authenticating with a different tenant than your Azure Dev
71
71
72
72
Look for the `tenantId` field in the output for the desired tenant (for guest accounts this will be the tenant of your organization and may be different than the Azure Devops Organization tenant).
73
73
74
-
2.**Configure the MCP server with the tenant ID** by updating your `.vscode/mcp.json`:
74
+
2.**Configure the MCP server with the tenant ID** by updating your `.vscode/mcp.json`.
75
+
76
+
🧨 Installation from Public Feed Configuration:
77
+
78
+
```json
79
+
{
80
+
"inputs": [
81
+
{
82
+
"id": "ado_org",
83
+
"type": "promptString",
84
+
"description": "Azure DevOps organization name (e.g. 'contoso')"
85
+
},
86
+
{
87
+
"id": "ado_tenant",
88
+
"type": "promptString",
89
+
"description": "Azure tenant ID (required for multi-tenant scenarios)"
@@ -102,3 +130,44 @@ The MCP server may be authenticating with a different tenant than your Azure Dev
102
130
4.**When prompted**, enter:
103
131
- Your Azure DevOps organization name
104
132
- The tenant ID from step 1
133
+
134
+
### Dev Container and WSL Authentication Issues
135
+
136
+
If the tenant configuration solution above doesn't resolve your authentication issues, and you're working in a **Dev Container** or **WSL (Windows Subsystem for Linux)** environment, the root cause may be different.
137
+
138
+
#### Symptoms
139
+
140
+
- Same authorization errors as above (`TF400813: The user 'xxx' is not authorized to access this resource`)
141
+
- Tenant ID configuration didn't resolve the issue
142
+
- You're using VS Code with Dev Containers or WSL
143
+
- MCP server is configured in User Settings (global) rather than workspace settings
144
+
145
+
#### Root Cause
146
+
147
+
When MCP servers are configured in **User Settings** (global configuration), they inherit the environment context from the **host machine**, including `az login` authentication settings. In Dev Container or WSL scenarios, this means:
148
+
149
+
- The MCP server uses the host machine's Azure authentication
150
+
- Any `az login` performed inside the Dev Container or WSL environment is ignored
151
+
- There may be a mismatch between the authentication context the MCP server expects and your development environment
152
+
153
+
#### Solution
154
+
155
+
1.**Verify your MCP configuration location**:
156
+
- Check if your MCP server is configured in User Settings (global) vs Workspace Settings
157
+
- User Settings: Run `MCP: Open User Configuration` from Command Palette
158
+
- Workspace Settings: Check for `.vscode/mcp.json` in your project
159
+
160
+
2.**For User Settings (Global) MCP configuration**:
161
+
- Ensure you are logged into Azure from the **host machine** (not inside the Dev Container/WSL)
162
+
- Run `az login` on the host Windows machine (outside of WSL/Dev Container)
163
+
- Do NOT run `az login` inside the Dev Container or WSL environment
164
+
- Restart VS Code completely
165
+
166
+
3.**Alternative: Use Workspace Settings instead**:
167
+
- Move your MCP server configuration from User Settings to Workspace Settings
168
+
- Create/update `.vscode/mcp.json` in your project
169
+
- This allows the MCP server to use the authentication context from within the Dev Container/WSL environment
170
+
171
+
4.**For Dev Containers specifically**:
172
+
- Consider configuring MCP servers directly in your `devcontainer.json` file using the `customizations.vscode.mcp` section
173
+
- This ensures the MCP server runs within the containerized environment with the correct context
0 commit comments