AuthenticationRequiredException Class

public final class AuthenticationRequiredException
extends CredentialUnavailableException

The Authentication Required Exception is thrown by InteractiveBrowserCredential and DeviceCodeCredential to indicate to the user that automatic authentication is disabled and authentication needs to be initiated via authenticate() or authenticate() APIs respectively before fetching an access token.