# IGoogleWorkspaceCredentialSource

Abstraction over the mechanism that acquires Google access tokens.

Interface 

`OfficeIMO.GoogleWorkspace`

**Namespace**

`OfficeIMO.GoogleWorkspace`

**Assembly**

`OfficeIMO.GoogleWorkspace`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[GoogleWorkspaceTypes.cs:5](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.GoogleWorkspace/GoogleWorkspaceTypes.cs#L5)

**Modifiers**

abstract

Abstraction over the mechanism that acquires Google access tokens.

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Authenticate to Google Workspace](/docs/google-workspace/authentication/) Guide
  
  Create a GoogleWorkspaceSession in .NET from a service account, a short-lived access token, or existing Google APIs credentials.

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [GoogleWorkspaceSession.CredentialSource](/api/google-workspace/officeimo-googleworkspace-googleworkspacesession/#property-credentialsource)

### Accepted by parameters 1

- Constructor [GoogleWorkspaceSession.GoogleWorkspaceSession](/api/google-workspace/officeimo-googleworkspace-googleworkspacesession/#constructor-ctor-officeimo-googleworkspace-igoogleworkspacecredentialsource-officeimo-googleworkspace-googleworkspacesessionoptions) parameter `credentialSource`

Filter members 

Show inherited

## Methods

`public abstract Task<GoogleWorkspaceAccessToken> AcquireAccessTokenAsync(IEnumerable<string> scopes, CancellationToken cancellationToken = default)` [#](#method-acquireaccesstokenasync-collections-generic-ienumerable-system-string-threading-cancellationtoken)

Acquires an access token and its available scope evidence for the requested operation.

Parameters

**scopes System.Collections.Generic.IEnumerable<string> required**

OAuth scopes required by the pending operation.

**cancellationToken System.Threading.CancellationToken = default optional**

Token used to cancel acquisition.

Returns

`Task<GoogleWorkspaceAccessToken>` A task that produces the acquired token and its scope and identity evidence. Callers must verify that the evidence covers their required scopes.

<!-- PowerForge markdown artifact sha256:88614DC8ECAF76247933EFE7F8131F4C2DEF32AB5A13FC8BF2B83FDF8D4D7AB2 -->
