Skip to content

Deprecate UseEmbeddedWebView property in BrowserCustomizationOptions #50516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 10, 2025

This PR deprecates the UseEmbeddedWebView property in the BrowserCustomizationOptions class by adding the [Obsolete] attribute with an appropriate deprecation message.

Changes Made

  • Added [Obsolete] attribute to the UseEmbeddedWebView property with the message: "This option requires additional dependencies on Microsoft.Identity.Client.Desktop and is no longer supported. Consider using brokered authentication instead"
  • Updated API surface files for both .NET 8.0 and .NET Standard 2.0 to reflect the deprecation
  • Added #pragma warning disable CS0618 suppressions in:
    • Test methods that verify the property functionality
    • Internal implementation code in MsalPublicClient.cs that still needs to support the property for backward compatibility

Background

The embedded browser functionality depends on Windows Forms, which requires the Microsoft.Identity.Client.Desktop assembly. Azure.Identity does not support the WithWindowsEmbeddedBrowserSupport scenario offered by MSAL directly, so users would need to use MSAL directly to utilize this feature. To address this limitation, we are deprecating this property and recommending users consider brokered authentication instead.

Backward Compatibility

The property remains functional for existing code but will now emit compiler warnings encouraging migration to alternative authentication methods. All existing tests continue to pass with appropriate warning suppressions.

Fixes #50495.

@Copilot Copilot AI changed the title [WIP] Consider deprecating UseEmbeddedView property on InteractiveBrowserCredentialOptions Deprecate UseEmbeddedWebView property in BrowserCustomizationOptions Jun 10, 2025
@Copilot Copilot AI requested a review from christothes June 10, 2025 15:45
Copilot finished work on behalf of christothes June 10, 2025 15:46
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.

Consider deprecating UseEmbeddedView property on InteractiveBrowserCredentialOptions
2 participants