FileCredentialError Class

Raised when no credential was available for the Graph call. Detectable before any HTTP request.

Distinct from FileUrlExpiredError, which means a pre-authorized URL lapsed and no usable Graph route existed. This error means the Graph route was ruled out before the request, because no usable credential was available: either a token could not be acquired, or the one acquired carries no file-capable permission.

Constructor

FileCredentialError(actor: Literal['app', 'agentic_user'] | None = None, cause: str | None = None)

Parameters

Name Description
actor
Default value: None
cause
Default value: None

Attributes

actor

The identity the fetch was attempted as, when one was selected. None when the failure preceded selection.

actor: Literal['app', 'agentic_user'] | None

cause

What went wrong while acquiring the token, when the attempt failed rather than simply returning nothing.

An acquisition that raised and an identity with no permissions both arrive here as "no token", but the fixes differ: one is a transient or configuration fault, the other is a consent problem. Local to this process; contrast FileAccessError.details, which is the service's own words.

cause: str | None