AuthenticationRequiredError Class

Interactive authentication is required to acquire a token.

This error is raised only by interactive user credentials configured not to automatically prompt for user interaction as needed. Its properties provide additional information that may be required to authenticate. The control_interactive_prompts sample demonstrates handling this error by calling a credential's "authenticate" method.

Inheritance
azure.identity._exceptions.CredentialUnavailableError
AuthenticationRequiredError

Constructor

AuthenticationRequiredError(scopes: Iterable[str], message: str | None = None, claims: str | None = None, **kwargs: Any)

Parameters

Name Description
scopes
Required
str

Scopes requested during the failed authentication

message
str

An error message explaining the reason for the exception.

Default value: None
claims
str

Additional claims required in the next authentication.

Default value: None

Methods

add_note

Exception.add_note(note) – add a note to the exception

raise_with_traceback

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don't support Python 2 anymore. Use raise/from instead.

with_traceback

Exception.with_traceback(tb) – set self.traceback to tb and return self.

add_note

Exception.add_note(note) – add a note to the exception

add_note()

raise_with_traceback

Raise the exception with the existing traceback.

Deprecated since version 1.22.0: This method is deprecated as we don't support Python 2 anymore. Use raise/from instead.

raise_with_traceback() -> None

with_traceback

Exception.with_traceback(tb) – set self.traceback to tb and return self.

with_traceback()

Attributes

args

claims

Additional claims required in the next authentication.

Returns

Type Description
str,

scopes

Scopes requested during the failed authentication.

Returns

Type Description