<PackageReference Include="Azure.Identity" Version="1.19.0" />

Azure.Identity.AuthenticationRequiredException

An exception indicating that interactive authentication is required.
public TokenRequestContext TokenRequestContext { get; }

The details of the authentication request which resulted in the authentication failure.

public AuthenticationRequiredException(string message, TokenRequestContext context)

Creates a new AuthenticationRequiredException with the specified message and context.

public AuthenticationRequiredException(string message, TokenRequestContext context, Exception innerException)

Creates a new AuthenticationRequiredException with the specified message, context and inner exception.

A constructor used for serialization.