Azure / Azure/azure-powershell

[Feature]: Use default system browser for interactive login

Open
#22,557 4 comments 1 reaction 1 assignee Claimed by @isra-fel View on GitHub
Azure PS Team feature-request Investigate :mag: WAM
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### 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

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.