# Class ProgrammaticExternalAccountCredential.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.ProgrammaticExternalAccountCredential.Initializer)
- [1.69.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.69.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)
- [1.68.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)
- [1.60.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)
- [1.59.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)
- [1.55.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)
- [1.50.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer)

    public class ProgrammaticExternalAccountCredential.Initializer : ExternalAccountCredential.Initializer

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

## 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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential)[Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer) \> ProgrammaticExternalAccountCredential.Initializer

## Inherited Members

[ExternalAccountCredential.Initializer.Audience](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_Audience) [ExternalAccountCredential.Initializer.SubjectTokenType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_SubjectTokenType) [ExternalAccountCredential.Initializer.ServiceAccountImpersonationUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_ServiceAccountImpersonationUrl) [ExternalAccountCredential.Initializer.WorkforcePoolUserProject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_WorkforcePoolUserProject) [ExternalAccountCredential.Initializer.ClientId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_ClientId) [ExternalAccountCredential.Initializer.ClientSecret](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_ClientSecret) [ExternalAccountCredential.Initializer.UniverseDomain](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer#Google_Apis_Auth_OAuth2_ExternalAccountCredential_Initializer_UniverseDomain) [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)

## 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

## Constructors

### Initializer(ProgrammaticExternalAccountCredential)

    public Initializer(ProgrammaticExternalAccountCredential credential)

Builds and initializer for [ProgrammaticExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential) from the given credential.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `credential` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential` |

### Initializer(Initializer)

    public Initializer(ProgrammaticExternalAccountCredential.Initializer other)

Builds and initializer for [ProgrammaticExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential) from the given initializer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredentialhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer` |

### Initializer(string, string, string, ISubjectTokenProvider)

    public Initializer(string tokenUrl, string audience, string subjectTokenType, ProgrammaticExternalAccountCredential.ISubjectTokenProvider subjectTokenProvider)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `tokenUrl` | `https://learn.microsoft.com/dotnet/api/system.string` The STS token exchange endpoint. Must not be null or empty. |
| `audience` | `https://learn.microsoft.com/dotnet/api/system.string` The STS audience which contains the resource name for the workload identity pool and the provider identifier in that pool. Must not be null or empty. |
| `subjectTokenType` | `https://learn.microsoft.com/dotnet/api/system.string` The STS subject token type based on the [OAuth 2.0 token exchange specification](https://datatracker.ietf.org/doc/html/rfc8693#section-3). Must not be null or empty. |
| `subjectTokenProvider` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredentialhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.ISubjectTokenProvider` The provider of the third-party token that's included on the STS token exchange request. Must not be null. |

## Properties

### SubjectTokenProvider

    public ProgrammaticExternalAccountCredential.ISubjectTokenProvider SubjectTokenProvider { get; }

The provider of the third-party token that's included on the STS token exchange request.
Will not be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredentialhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.ISubjectTokenProvider` |   |

## 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_)