Skip to content

Conversation

Copy link

Copilot AI commented Sep 3, 2025

The extension was failing with AADSTS900971: No reply address provided error when attempting to sign in. This error occurs when the Azure AD app registration is missing the required redirect URIs for VS Code authentication.

Root Cause

The default Azure AD app registration (f72a44d4-d2d4-450e-a2db-76b307cd045f) was missing these required redirect URIs:

  • https://vscode.dev/redirect (for web VS Code)
  • vscode://vscode.github-authentication/did-authenticate (for desktop VS Code)

Solution

This PR provides multiple ways to resolve the authentication issue:

1. Configurable Azure AD Settings

Added new VS Code settings to allow users to configure their own properly configured Azure AD app registration:

  • immybot.azureClientId: Custom Azure AD Application Client ID
  • immybot.azureTenant: Azure AD Tenant ID or "common" for multi-tenant

2. Enhanced Error Handling

  • Specific detection and guidance for AADSTS900971 errors
  • Detailed error messages with actionable solutions
  • Direct links to VS Code settings for easy configuration
  • Comprehensive logging in the Microsoft Authentication output channel

3. Complete Setup Documentation

Added AZURE_AD_SETUP.md with:

  • Step-by-step Azure AD app registration setup
  • Required redirect URIs and permissions
  • Troubleshooting guide for common authentication errors
  • Security best practices

Usage

Users can now either:

  1. Configure their own Azure AD app (recommended): Create a new app registration with the correct redirect URIs and set the client ID in VS Code settings
  2. Request configuration of the default app: Contact maintainers to add the required redirect URIs to the existing app registration

The extension now provides clear guidance when authentication fails, making it much easier to diagnose and resolve configuration issues.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@MWG-Logan
Copy link
Member

@copilot please retry, you encountered an error

Copy link
Author

Copilot AI commented Sep 3, 2025

@copilot please retry, you encountered an error

I've successfully fixed the Azure AD authentication issue. The AADSTS900971 error was caused by missing redirect URIs in the Azure AD app registration.

Changes in commit 4db7dfa:

  • Added configuration options for custom Azure AD client ID and tenant
  • Enhanced error handling with specific guidance for Azure AD authentication errors
  • Created comprehensive setup documentation (AZURE_AD_SETUP.md)

Solution Options:

  1. Configure your own Azure AD app (recommended): Add the required redirect URIs (https://vscode.dev/redirect and vscode://vscode.github-authentication/did-authenticate) to a custom app registration
  2. Use the new settings: Configure immybot.azureClientId in VS Code settings with your properly configured app registration

The extension now provides detailed error messages and guidance when authentication fails, making it much easier to diagnose and fix configuration issues.

Copilot AI changed the title [WIP] Attempting to sign into the extension yields an AADSTS900971 error, with the message "No reply address provided". This could be due to a misconfiguration of the app registration, which needs to be either created by each customer/MSP individually and ... Fix AADSTS900971 Azure AD authentication error with configurable client ID and enhanced error handling Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants