Class User
The Directory API allows you to create and manage your account's users, user aliases, and user Google profile photos. For more information about common tasks, see the User Accounts Developer's Guide and the User Aliases Developer's Guide.
Implements
Inherited Members
Namespace: Google.Apis.Admin.Directory.directory_v1.Data
Assembly: Google.Apis.Admin.Directory.directory_v1.dll
Syntax
public class User : IDirectResponseSchema
Properties
Addresses
The list of the user's addresses. The maximum allowed data size for this field is 10KB.
Declaration
[JsonProperty("addresses")]
public virtual IList<UserAddress> Addresses { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserAddress> |
AgreedToTerms
Output only. This property is true if the user has completed an initial login and accepted the Terms of
Service agreement.
Declaration
[JsonProperty("agreedToTerms")]
public virtual bool? AgreedToTerms { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Aliases
Output only. The list of the user's alias email addresses.
Declaration
[JsonProperty("aliases")]
public virtual IList<string> Aliases { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<string> |
Archived
Indicates if user is archived.
Declaration
[JsonProperty("archived")]
public virtual bool? Archived { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
ChangePasswordAtNextLogin
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
Declaration
[JsonProperty("changePasswordAtNextLogin")]
public virtual bool? ChangePasswordAtNextLogin { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
CreationTime
DateTime representation of CreationTimeRaw.
Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use CreationTimeDateTimeOffset instead.")]
public virtual DateTime? CreationTime { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
CreationTimeDateTimeOffset
DateTimeOffset representation of CreationTimeRaw.
Declaration
[JsonIgnore]
public virtual DateTimeOffset? CreationTimeDateTimeOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
CreationTimeRaw
User's G Suite account creation time. (Read-only)
Declaration
[JsonProperty("creationTime")]
public virtual string CreationTimeRaw { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CustomSchemas
Custom fields of the user. The key is a schema_name and its values are 'field_name': 'field_value'.
Declaration
[JsonProperty("customSchemas")]
public virtual IDictionary<string, IDictionary<string, object>> CustomSchemas { get; set; }
Property Value
| Type | Description |
|---|---|
| IDictionary<string, IDictionary<string, object>> |
CustomerId
Output only. The customer ID to retrieve all account
users. You can use the alias my_customer
to represent your account's customerId. As a reseller administrator, you can use the resold customer
account's customerId. To get a customerId, use the account's primary domain in the domain parameter of
a users.list request.
Declaration
[JsonProperty("customerId")]
public virtual string CustomerId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DeletionTime
DateTime representation of DeletionTimeRaw.
Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use DeletionTimeDateTimeOffset instead.")]
public virtual DateTime? DeletionTime { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
DeletionTimeDateTimeOffset
DateTimeOffset representation of DeletionTimeRaw.
Declaration
[JsonIgnore]
public virtual DateTimeOffset? DeletionTimeDateTimeOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
DeletionTimeRaw
Declaration
[JsonProperty("deletionTime")]
public virtual string DeletionTimeRaw { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ETag
Output only. ETag of the resource.
Declaration
[JsonProperty("etag")]
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Emails
The list of the user's email addresses. The maximum allowed data size for this field is 10KB. This excludes
publicKeyEncryptionCertificates.
Declaration
[JsonProperty("emails")]
public virtual IList<UserEmail> Emails { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserEmail> |
ExternalIds
The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
Declaration
[JsonProperty("externalIds")]
public virtual IList<UserExternalId> ExternalIds { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserExternalId> |
Gender
The user's gender. The maximum allowed data size for this field is 1KB.
Declaration
[JsonProperty("gender")]
public virtual object Gender { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
HashFunction
Stores the hash format of the password property. The following hashFunction values are allowed: * MD5
- Accepts simple hex-encoded values. *
SHA-1- Accepts simple hex-encoded values. *crypt- Compliant with the C crypt library. Supports the DES, MD5 (hash prefix$1$), SHA-256 (hash prefix$5$), and SHA-512 (hash prefix$6$) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
Declaration
[JsonProperty("hashFunction")]
public virtual string HashFunction { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Id
The unique ID for the user. A user id can be used as a user request URI's userKey.
Declaration
[JsonProperty("id")]
public virtual string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Ims
The list of the user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size for this field is 2KB.
Declaration
[JsonProperty("ims")]
public virtual IList<UserIm> Ims { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserIm> |
IncludeInGlobalAddressList
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain. For more information about excluding user profiles, see the administration help center.
Declaration
[JsonProperty("includeInGlobalAddressList")]
public virtual bool? IncludeInGlobalAddressList { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IpWhitelisted
If true, the user's IP address is subject to a deprecated IP address
allowlist configuration.
Declaration
[JsonProperty("ipWhitelisted")]
public virtual bool? IpWhitelisted { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IsAdmin
Output only. Indicates a user with super admininistrator privileges. The isAdmin property can only be
edited in the Make a user an administrator
operation ( makeAdmin method). If edited in the
user insert or
update methods, the edit is ignored by the API
service.
Declaration
[JsonProperty("isAdmin")]
public virtual bool? IsAdmin { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IsDelegatedAdmin
Output only. Indicates if the user is a delegated administrator. Delegated administrators are supported by the API but cannot create or undelete users, or make users administrators. These requests are ignored by the API service. Roles and privileges for administrators are assigned using the Admin console.
Declaration
[JsonProperty("isDelegatedAdmin")]
public virtual bool? IsDelegatedAdmin { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IsEnforcedIn2Sv
Output only. Is 2-step verification enforced (Read-only)
Declaration
[JsonProperty("isEnforcedIn2Sv")]
public virtual bool? IsEnforcedIn2Sv { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IsEnrolledIn2Sv
Output only. Is enrolled in 2-step verification (Read-only)
Declaration
[JsonProperty("isEnrolledIn2Sv")]
public virtual bool? IsEnrolledIn2Sv { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
IsMailboxSetup
Output only. Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
Declaration
[JsonProperty("isMailboxSetup")]
public virtual bool? IsMailboxSetup { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Keywords
The list of the user's keywords. The maximum allowed data size for this field is 1KB.
Declaration
[JsonProperty("keywords")]
public virtual object Keywords { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Kind
Output only. The type of the API resource. For Users resources, the value is admin#directory#user.
Declaration
[JsonProperty("kind")]
public virtual string Kind { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Languages
The user's languages. The maximum allowed data size for this field is 1KB.
Declaration
[JsonProperty("languages")]
public virtual object Languages { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
LastLoginTime
DateTime representation of LastLoginTimeRaw.
Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use LastLoginTimeDateTimeOffset instead.")]
public virtual DateTime? LastLoginTime { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
LastLoginTimeDateTimeOffset
DateTimeOffset representation of LastLoginTimeRaw.
Declaration
[JsonIgnore]
public virtual DateTimeOffset? LastLoginTimeDateTimeOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
LastLoginTimeRaw
User's last login time. (Read-only)
Declaration
[JsonProperty("lastLoginTime")]
public virtual string LastLoginTimeRaw { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Locations
The user's locations. The maximum allowed data size for this field is 10KB.
Declaration
[JsonProperty("locations")]
public virtual object Locations { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Name
Holds the given and family names of the user, and the read-only fullName value. The maximum number of
characters in the givenName and in the familyName values is 60. In addition, name values support
unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes
(/), and periods (.). For more information about character usage rules, see the administration help
center. Maximum allowed data size for this field is 1KB.
Declaration
[JsonProperty("name")]
public virtual UserName Name { get; set; }
Property Value
| Type | Description |
|---|---|
| UserName |
NonEditableAliases
Output only. The list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
Declaration
[JsonProperty("nonEditableAliases")]
public virtual IList<string> NonEditableAliases { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<string> |
Notes
Notes for the user.
Declaration
[JsonProperty("notes")]
public virtual object Notes { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
OrgUnitPath
The full path of the parent organization associated with the user. If the parent organization is the
top-level, it is represented as a forward slash (/).
Declaration
[JsonProperty("orgUnitPath")]
public virtual string OrgUnitPath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Organizations
The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
Declaration
[JsonProperty("organizations")]
public virtual IList<UserOrganization> Organizations { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserOrganization> |
Password
User's password
Declaration
[JsonProperty("password")]
public virtual string Password { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Phones
The list of the user's phone numbers. The maximum allowed data size for this field is 1KB.
Declaration
[JsonProperty("phones")]
public virtual IList<UserPhone> Phones { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserPhone> |
PosixAccounts
The list of POSIX account information for the user.
Declaration
[JsonProperty("posixAccounts")]
public virtual object PosixAccounts { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
PrimaryEmail
The user's primary email address. This property is required in a request to create a user account. The
primaryEmail must be unique and cannot be an alias of another user.
Declaration
[JsonProperty("primaryEmail")]
public virtual string PrimaryEmail { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RecoveryEmail
Recovery email of the user.
Declaration
[JsonProperty("recoveryEmail")]
public virtual string RecoveryEmail { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RecoveryPhone
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
Declaration
[JsonProperty("recoveryPhone")]
public virtual string RecoveryPhone { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Relations
The list of the user's relationships to other users. The maximum allowed data size for this field is 2KB.
Declaration
[JsonProperty("relations")]
public virtual IList<UserRelation> Relations { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserRelation> |
SshPublicKeys
A list of SSH public keys.
Declaration
[JsonProperty("sshPublicKeys")]
public virtual object SshPublicKeys { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Suspended
Indicates if user is suspended.
Declaration
[JsonProperty("suspended")]
public virtual bool? Suspended { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
SuspensionReason
Output only. Has the reason a user account is suspended either by the administrator or by Google at the time
of suspension. The property is returned only if the suspended property is true.
Declaration
[JsonProperty("suspensionReason")]
public virtual string SuspensionReason { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ThumbnailPhotoEtag
Output only. ETag of the user's photo (Read-only)
Declaration
[JsonProperty("thumbnailPhotoEtag")]
public virtual string ThumbnailPhotoEtag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ThumbnailPhotoUrl
Output only. The URL of the user's profile photo. The URL might be temporary or private.
Declaration
[JsonProperty("thumbnailPhotoUrl")]
public virtual string ThumbnailPhotoUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Websites
The user's websites. The maximum allowed data size for this field is 2KB.
Declaration
[JsonProperty("websites")]
public virtual IList<UserWebsite> Websites { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<UserWebsite> |