Skip to main content
Version: v2

TokenFetchOptions Interface

Represents access token fetch options

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/odsp-driver-definitions/legacy.

For more information about our API support guarantees, see here.

Signature​

export interface TokenFetchOptions

Properties​

PropertyAlertsModifiersTypeDescription
claimsBetaoptionalstringClaims that have to be passed with token fetch request. These can be used to specify additional information that must be passed to token authority.
refreshBetabooleanValue indicating whether fresh token has to be returned. If false then it is okay to return cached unexpired token if available.
requestBetaoptional, readonly{ url: string; method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT"; }Request that will be made using the fetched token. - url: full request url, including query params - method: method type Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.
tenantIdBetaoptionalstringTenant id of authority that must be handling token fetch. If it is not specified then it is up to token fetching logic to determine which tenant authority to use to issue access token.

Property Details​

claims​

Claims that have to be passed with token fetch request. These can be used to specify additional information that must be passed to token authority.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

claims?: string;

Type: string

refresh​

Value indicating whether fresh token has to be returned. If false then it is okay to return cached unexpired token if available.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

refresh: boolean;

Type: boolean

request​

Request that will be made using the fetched token. - url: full request url, including query params - method: method type Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

readonly request?: {
url: string;
method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT";
};

Type: { url: string; method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT"; }

tenantId​

Tenant id of authority that must be handling token fetch. If it is not specified then it is up to token fetching logic to determine which tenant authority to use to issue access token.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

tenantId?: string;

Type: string