Optional. A unique username, if different from all the other identifiers
and account_id that are provided. Can be a unique login handle or
display name for a user.
[[["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 latest version of the Google Cloud reCAPTCHA Enterprise v1 API class UserId is 2.17.0.\u003c/p\u003e\n"],["\u003cp\u003eThe UserId class provides a way to associate identifiers such as email, phone number, and username with a user.\u003c/p\u003e\n"],["\u003cp\u003eThe UserId class implements multiple interfaces including IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"],["\u003cp\u003eThere are several versions of the UserId class available, ranging from 1.2.0 up to the latest version 2.17.0.\u003c/p\u003e\n"],["\u003cp\u003eUserId contains several optional properties such as Email, PhoneNumber, and Username, each with their own type and description.\u003c/p\u003e\n"]]],[],null,["# Google Cloud reCAPTCHA Enterprise v1 API - Class UserId (2.18.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.18.0 (latest)](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/latest/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.17.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.16.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.15.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.14.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.13.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.12.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.11.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.10.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.9.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.8.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.7.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.6.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.5.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.4.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.3.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.2.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.1.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/2.0.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/1.6.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/1.5.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/1.4.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/1.3.0/Google.Cloud.RecaptchaEnterprise.V1.UserId)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/1.2.0/Google.Cloud.RecaptchaEnterprise.V1.UserId) \n\n public sealed class UserId : IMessage\u003cUserId\u003e, IEquatable\u003cUserId\u003e, IDeepCloneable\u003cUserId\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud reCAPTCHA Enterprise v1 API class UserId.\n\nAn identifier associated with a user. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UserId \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UserId](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/latest/Google.Cloud.RecaptchaEnterprise.V1.UserId), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UserId](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/latest/Google.Cloud.RecaptchaEnterprise.V1.UserId), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UserId](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/latest/Google.Cloud.RecaptchaEnterprise.V1.UserId), [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.RecaptchaEnterprise.V1](/dotnet/docs/reference/Google.Cloud.RecaptchaEnterprise.V1/latest/Google.Cloud.RecaptchaEnterprise.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.RecaptchaEnterprise.V1.dll\n\nConstructors\n------------\n\n### UserId()\n\n public UserId()\n\n### UserId(UserId)\n\n public UserId(UserId other)\n\nProperties\n----------\n\n### Email\n\n public string Email { get; set; }\n\nOptional. An email address.\n\n### HasEmail\n\n public bool HasEmail { get; }\n\nGets whether the \"email\" field is set\n\n### HasPhoneNumber\n\n public bool HasPhoneNumber { get; }\n\nGets whether the \"phone_number\" field is set\n\n### HasUsername\n\n public bool HasUsername { get; }\n\nGets whether the \"username\" field is set\n\n### IdOneofCase\n\n public UserId.IdOneofOneofCase IdOneofCase { get; }\n\n### PhoneNumber\n\n public string PhoneNumber { get; set; }\n\nOptional. A phone number. Should use the E.164 format.\n\n### Username\n\n public string Username { get; set; }\n\nOptional. A unique username, if different from all the other identifiers\nand `account_id` that are provided. Can be a unique login handle or\ndisplay name for a user."]]