public sealed class Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken : IMessage<Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken>, IEquatable<Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken>, IDeepCloneable<Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken>, IBufferMessage, IMessage
Reference documentation and code samples for the Eventarc v1 API class Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken.
Represents a config used to authenticate with a Google OIDC token using
a GCP service account. Use this authentication method to invoke your
Cloud Run and Cloud Functions destinations or HTTP endpoints that
support Google OIDC.
Optional. Audience to be used to generate the OIDC Token. The
audience claim identifies the recipient that the JWT is intended for.
If unspecified, the destination URI will be used.
Required. Service account email used to generate the OIDC Token.
The principal who calls this API must have
iam.serviceAccounts.actAs permission in the service account. See
https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
for more information. Eventarc service agents must have
roles/roles/iam.serviceAccountTokenCreator role to allow the
Pipeline to create OpenID tokens for authenticated requests.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOidcToken\u003c/code\u003e class in the Eventarc v1 API allows for authentication using a Google OIDC token with a GCP service account, enabling secure invocation of Cloud Run, Cloud Functions, or other HTTP endpoints.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, indicating its role in handling messages and ensuring compatibility.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOidcToken\u003c/code\u003e class requires a service account email to generate the OIDC token, and the caller must possess the \u003ccode\u003eiam.serviceAccounts.actAs\u003c/code\u003e permission on that service account, with the Eventarc service agent needing the \u003ccode\u003eiam.serviceAccountTokenCreator\u003c/code\u003e role.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003eAudience\u003c/code\u003e property can be specified to designate the recipient of the JWT, defaulting to the destination URI if left unspecified, to provide better control of token usage.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation provides a comprehensive list of available versions for \u003ccode\u003eOidcToken\u003c/code\u003e with the latest being 2.6.0, and goes as far back as 1.0.0, allowing for selection of the specific version for reference.\u003c/p\u003e\n"]]],[],null,["# Eventarc v1 API - Class Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.5.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.4.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.3.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.2.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.1.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/2.0.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/1.3.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/1.2.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/1.1.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/1.0.0/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken) \n\n public sealed class Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken : IMessage\u003cPipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken\u003e, IEquatable\u003cPipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken\u003e, IDeepCloneable\u003cPipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Eventarc v1 API class Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken.\n\nRepresents a config used to authenticate with a Google OIDC token using\na GCP service account. Use this authentication method to invoke your\nCloud Run and Cloud Functions destinations or HTTP endpoints that\nsupport Google OIDC. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Pipeline](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types)[Destination](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types)[AuthenticationConfig](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types)[OidcToken](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Pipeline](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types)[Destination](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types)[AuthenticationConfig](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types)[OidcToken](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Pipeline](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types)[Destination](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types)[AuthenticationConfig](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig)[Types](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types)[OidcToken](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Eventarc.V1](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Eventarc.V1.dll\n\nConstructors\n------------\n\n### OidcToken()\n\n public OidcToken()\n\n### OidcToken(OidcToken)\n\n public OidcToken(Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken other)\n\nProperties\n----------\n\n### Audience\n\n public string Audience { get; set; }\n\nOptional. Audience to be used to generate the OIDC Token. The\naudience claim identifies the recipient that the JWT is intended for.\nIf unspecified, the destination URI will be used.\n\n### ServiceAccount\n\n public string ServiceAccount { get; set; }\n\nRequired. Service account email used to generate the OIDC Token.\nThe principal who calls this API must have\niam.serviceAccounts.actAs permission in the service account. See\n\u003chttps://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common\u003e\nfor more information. Eventarc service agents must have\nroles/roles/iam.serviceAccountTokenCreator role to allow the\nPipeline to create OpenID tokens for authenticated requests.\n\n### ServiceAccountAsServiceAccountName\n\n public ServiceAccountName ServiceAccountAsServiceAccountName { get; set; }\n\n[ServiceAccountName](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.ServiceAccountName)-typed view over the [ServiceAccount](/dotnet/docs/reference/Google.Cloud.Eventarc.V1/latest/Google.Cloud.Eventarc.V1.Pipeline.Types.Destination.Types.AuthenticationConfig.Types.OidcToken#Google_Cloud_Eventarc_V1_Pipeline_Types_Destination_Types_AuthenticationConfig_Types_OidcToken_ServiceAccount)\nresource name property."]]