AuthenticationRecord Class

Non-secret account information for an authenticated user

This class enables DeviceCodeCredential and InteractiveBrowserCredential to access previously cached authentication data. Applications shouldn't construct instances of this class. They should instead acquire one from a credential's authenticate method, such as authenticate. See the user_authentication sample for more details.

Inheritance
builtins.object
AuthenticationRecord

Constructor

AuthenticationRecord(tenant_id: str, client_id: str, authority: str, home_account_id: str, username: str)

Parameters

Name Description
tenant_id
Required
str

The tenant the account should authenticate in.

client_id
Required
str

The client ID of the application which performed the original authentication.

authority
Required
str

The authority host used to authenticate the account.

home_account_id
Required
str

A unique identifier of the account.

username
Required
str

The user principal or service principal name of the account.

Methods

deserialize

Deserialize a record.

serialize

Serialize the record.

deserialize

Deserialize a record.

deserialize(data: str) -> AuthenticationRecord

Parameters

Name Description
data
Required
str

A serialized record.

Returns

Type Description

The deserialized record.

serialize

Serialize the record.

serialize() -> str

Returns

Type Description
str

The serialized record.

Attributes

authority

The authority host used to authenticate the account.

Returns

Type Description
str

client_id

The client ID of the application which performed the original authentication.

Returns

Type Description
str

home_account_id

A unique identifier of the account.

Returns

Type Description
str

tenant_id

The tenant the account should authenticate in.

Returns

Type Description
str

username

The user principal or service principal name of the account.

Returns

Type Description
str