ICustomWebUi Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Interface that an MSAL.NET extender can implement to provide their own web UI in public client applications to sign-in user and have them consented part of the Authorization code flow. MSAL.NET provides an embedded web view for Windows and Mac, but there are other scenarios not yet supported. This extensibility point enables them to provide such UI in a secure way
public interface ICustomWebUi
type ICustomWebUi = interface
Public Interface ICustomWebUi
Remarks
Caution
ICustomWebUi is not recommended for production use due to security risks and current service limitations, and is on a deprecation path.
This pattern introduces security risks and is not supported by Entra ID cloud services. Using native client redirect URIs (like https://login.microsoftonline.com/common/oauth2/nativeclient) with custom web UI implementations typically requires users to manually copy the authorization code from the URL—an anti-pattern most commonly seen with the nativeclient URI. This pattern will not work in most configurations.
- Recommended Alternatives:
- Use Broker authentication (WAM) for Windows 10+ applications - provides the best security and user experience
- Use embedded browser flow as described in Using web browsers
Methods
| Name | Description |
|---|---|
| AcquireAuthorizationCodeAsync(Uri, Uri, CancellationToken) |
Method called by MSAL.NET to delegate the authentication code web with the Secure Token Service (STS) |