Language

GraphCredential Class

Definition

Supplies a bearer token for Graph, and names the identity it belongs to.

Resolved at fetch time rather than stored on the file handle, so a handle stays inert and a token is never acquired before it is needed. Returning null for the token means no credential is available, which surfaces as a FileCredentialException before any request is made.

public sealed class GraphCredential
type GraphCredential = class
Public NotInheritable Class GraphCredential
Inheritance
GraphCredential

Constructors

Name Description
GraphCredential(FileActor, Func<CancellationToken,Task<String>>, Uri)

Initializes a new instance of the GraphCredential class.

Properties

Name Description
Actor

Which identity this credential belongs to.

BaseUrlRoot

Graph host root, e.g. https://graph.microsoft.com. The API version is appended at the point of use.

Methods

Name Description
GetTokenAsync(CancellationToken)

Resolve the bearer token, or null when no credential is available.

Applies to