1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    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.md.txt).

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

## Inherited Members

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

## 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.md.txt) from the given credential.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `credential` | `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.md.txt) from the given initializer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `ProgrammaticExternalAccountCredentialInitializer` |

### 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.md.txt).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `tokenUrl` | `string` The STS token exchange endpoint. Must not be null or empty. |
| `audience` | `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` | `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` | `ProgrammaticExternalAccountCredentialISubjectTokenProvider` 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** |
| `ProgrammaticExternalAccountCredentialISubjectTokenProvider` |   |

## Extension Method

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