Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.22k stars 3.83k forks source link

[Feature]: Use default system browser for interactive login #22557

Open TheOnlyWei opened 1 year ago

TheOnlyWei commented 1 year ago

Description of the new feature

Az.Accounts should be configurable to use default OS browser, and not always use .NET default legacy embedded browser for interactive browser login. Currently on our on-premise environment, the cookies are being dropped and CSS is not rendered correctly by the .NET legacy default embedded browser.

Proposed implementation details (optional)

The code in question from MSAL library: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/fa7122b98df7cdeb78c55d1c3ef53065c35b980c/src/client/Microsoft.Identity.Client/Platforms/netdesktop/NetDesktopWebUIFactory.cs#L42

Configuration is through InteractiveBrowserCredentialOptions object: https://github.com/Azure/azure-powershell/blob/abf9130c5cc547856a2abbd909df9190df54aff8/src/Accounts/Authenticators/InteractiveUserAuthenticator.cs#L62C50-L62C50

For BrowserCustomizationOptions object here: https://github.com/Azure/azure-sdk-for-net/blob/d90042d570a6531d7f7ed97e82ddfe95c730158b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs#L72C26-L72C26

Specifically, it seems you have to set UseEmbeddedWebView to false for BrowserCustomizedOptions here if a user wants to use OS browser instead of legacy embedded .NET one: https://github.com/Azure/azure-sdk-for-net/blob/d90042d570a6531d7f7ed97e82ddfe95c730158b/sdk/identity/Azure.Identity/src/Credentials/BrowserCustomizationOptions.cs#L20C36-L20C36

domggarrity commented 10 months ago

Hi @isra-fel, just checking in on this from Azure Stack. Are we able to add this feature?

domggarrity commented 6 months ago

Hi @isra-fel, just following up on this.

domggarrity commented 2 months ago

Hi @isra-fel, do we have any update on this?