# IAM Service Account Credentials v1 API - Class GenerateIdTokenRequest (2.5.0)

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

- [2.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/2.4.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/2.3.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/2.2.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/2.1.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/2.0.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/1.2.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/1.1.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/1.0.0/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest)

    public sealed class GenerateIdTokenRequest : IMessage<GenerateIdTokenRequest>, IEquatable<GenerateIdTokenRequest>, IDeepCloneable<GenerateIdTokenRequest>, IBufferMessage, IMessage

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GenerateIdTokenRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateIdTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateIdTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateIdTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iam.Credentials.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1)

## Assembly

Google.Cloud.Iam.Credentials.V1.dll

## Constructors

### GenerateIdTokenRequest()

    public GenerateIdTokenRequest()

### GenerateIdTokenRequest(GenerateIdTokenRequest)

    public GenerateIdTokenRequest(GenerateIdTokenRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest` |

## Properties

### Audience

    public string Audience { get; set; }

Required. The audience for the token, such as the API or account that this token
grants access to.

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

### Delegates

    public RepeatedField<string> Delegates { get; }

The sequence of service accounts in a delegation chain. Each service
account must be granted the `roles/iam.serviceAccountTokenCreator` role
on its next service account in the chain. The last service account in the
chain must be granted the `roles/iam.serviceAccountTokenCreator` role
on the service account that is specified in the `name` field of the
request.

The delegates must have the following format:
`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
character is required; replacing it with a project ID is invalid.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### IncludeEmail

    public bool IncludeEmail { get; set; }

Include the service account email in the token. If set to `true`, the
token will contain `email` and `email_verified` claims.

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

### Name

    public string Name { get; set; }

Required. The resource name of the service account for which the credentials
are requested, in the following format:
`projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard
character is required; replacing it with a project ID is invalid.

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

### ServiceAccountName

    public ServiceAccountName ServiceAccountName { get; set; }

[ServiceAccountName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.ServiceAccountName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.GenerateIdTokenRequest#Google_Cloud_Iam_Credentials_V1_GenerateIdTokenRequest_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Credentials.V1/latest/Google.Cloud.Iam.Credentials.V1.ServiceAccountName` |   |