# Class ExternalAccountCredential.Initializer (1.73.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.73.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.69.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.69.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.68.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.60.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.59.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.55.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)
- [1.50.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer)

    public class ExternalAccountCredential.Initializer : ServiceCredential.Initializer

Initializer for [ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ServiceCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential)[Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer) \> ExternalAccountCredential.Initializer

## Inherited Members

[ServiceCredential.Initializer.TokenServerUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_TokenServerUrl) [ServiceCredential.Initializer.Clock](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_Clock) [ServiceCredential.Initializer.AccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_AccessMethod) [ServiceCredential.Initializer.HttpClientFactory](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_HttpClientFactory) [ServiceCredential.Initializer.DefaultExponentialBackOffPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_DefaultExponentialBackOffPolicy) [ServiceCredential.Initializer.QuotaProject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_QuotaProject) [ServiceCredential.Initializer.Scopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer#Google_Apis_Auth_OAuth2_ServiceCredential_Initializer_Scopes) [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ProgrammaticExternalAccountCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)

## Namespace

[Google.Apis.Auth.OAuth2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2)

## Assembly

Google.Apis.Auth.dll

## Properties

### Audience

    public string Audience { get; }

The STS audience which contains the resource name for the
workload identity pool or the workforce pool
and the provider identifier in that pool.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ClientId

    public string ClientId { get; set; }

The Client ID.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** Client ID and client secret are currently only required if the token info endpoint
needs to be called with the generated GCP access token.
When provided, STS will be called with additional basic authentication using
ClientId as username and ClientSecret as password.

### ClientSecret

    public string ClientSecret { get; set; }

The client secret.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** Client ID and client secret are currently only required if the token info endpoint
needs to be called with the generated GCP access token.
When provided, STS will be called with additional basic authentication using
ClientId as username and ClientSecret as password.

### ServiceAccountImpersonationUrl

    public string ServiceAccountImpersonationUrl { get; set; }

This is the URL for the service account impersonation request.
If this is not set, the STS-returned access token
should be directly used without impersonation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SubjectTokenType

    public string SubjectTokenType { get; }

The STS subject token type based on the OAuth 2.0 token exchange spec.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### UniverseDomain

    public string UniverseDomain { get; set; }

The universe domain this credential belongs to.
May be null, in which case the default universe domain will be used.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### WorkforcePoolUserProject

    public string WorkforcePoolUserProject { get; set; }

The GCP project number to be used for Workforce Identity Pools
external credentials.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** If this external account credential represents a Workforce Identity Pool
enabled identity and this values is not specified, then an API key needs to be
used alongside this credential to call Google APIs.

## Extension Method

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)