Language

FileCredentialException Class

Definition

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

Distinct from FileUrlExpiredException, which is terminal: a pre-authorized URL lapsed, and the SDK does not resolve those bytes another way even when a contentUrl and a Graph credential are both present. This exception 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.

public class FileCredentialException : Microsoft.Teams.Apps.Files.FileException
type FileCredentialException = class
    inherit FileException
Public Class FileCredentialException
Inherits FileException
Inheritance
FileCredentialException

Constructors

Name Description
FileCredentialException()

Initializes a new instance of the FileCredentialException class. Actor is left null.

FileCredentialException(Nullable<FileActor>, String)

Initializes a new instance of the FileCredentialException class with the identity a credential was being resolved for and why acquisition failed.

FileCredentialException(String, Exception)

Initializes a new instance of the FileCredentialException class with a specified error message and inner exception. Actor is left null.

FileCredentialException(String)

Initializes a new instance of the FileCredentialException class with a specified error message. Actor is left null.

Properties

Name Description
Actor

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

Cause

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

An acquisition that threw 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 Details, which is the service's own words.

Applies to