Skip to main content

Google Workspace Admin

This Integration is part of the G Suite Admin Pack.#

G Suite or Google Workspace Admin is an integration to perform an action on IT infrastructure, create users, update settings, and more administrative tasks. This integration was integrated and tested majorly with G Suite Basic edition.

Configure Service Account for G Suite Admin#

  1. Go to https://console.developers.google.com.

  2. Select or create a project:

    Setup Account

  1. Enable the Admin SDK API:

    1. Under the main menu, select APIs & Services -> 'Libary': Setup Account

    2. Enable Admin SDK: Setup Account

    3. Select the project and click 'OPEN': Setup Account

  2. Create a service account with correct restricted permissions:

    1. Under the main menu, select IAM & Admin -> Service Accounts: Setup Account

    2. In the top bar, select CREATE SERVICE ACCOUNT: Setup Account

    3. Under the main menu, select IAM & Admin -> Service Accounts and open the account you just created.

    4. Generate new credentials:

      1. On the Service account details page, under Keys, click ADD KEY and select Create new key: Setup Account

      2. Under Key type, select JSON, and click CREATE. Save the credentials in a secure location. You will need the generated credentials.json file when you configure the instance in Cortex XSOAR: Setup Account

Add Scopes in G Suite Admin#

  1. Go to https://admin.google.com

  2. Click Menu and select Security -> API Controls: Setup Account

  3. Under Domain wide delegation tab, Click MANAGE DOMAIN WIDE DELEGATION: Setup Account

  4. Click on Add new and the window will prompt, enter Client ID from your credentials.json and required scopes from integration tips. Setup Account

  5. Click AUTHORIZE.

Configure G Suite Admin on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for G Suite Admin.
  3. Click Add instance to create and configure a new integration instance.
ParameterDescriptionRequired
user_service_account_jsonUser's Service Account JSONTrue
admin_emailAn admin email is required for the Test validation to run, if not configured, then each command can receive an admin_email argument as optionalFalse
insecureTrust any certificate (not secure)False
proxyUse system proxy settingsFalse
  1. Click Test to validate credentails.json, and connection.

Commands#

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

gsuite-mobile-update#


Takes an action that affects a mobile device. For example, remotely wiping a device.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.mobile.action

Base Command#

gsuite-mobile-update

Input#

Argument NameDescriptionRequired
customer_idThe unique ID of the customer's G Suite account.Optional
resource_idThe unique ID used to identify the mobile device.Required
actionThe action to be performed on the device.

Available Options:
admin_account_wipe - Remotely wipes only G Suite data from the device.

admin_remote_wipe - Remotely wipes all data on the device.

approve - Approves the device.

block - Blocks access to G Suite data on the device.

cancel_remote_wipe_then_activate - Cancels a remote wipe of the device and then reactivates it.

cancel_remote_wipe_then_block - Cancels a remote wipe of the device and then blocks it.
Required
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-mobile-update resource_id=RESOURCE_ID action=admin_account_wipe customer_id=my_customer admin_email=admin@domain.io

Human Readable Output#

Mobile device with resource id - RESOURCE_ID updated.

gsuite-mobile-delete#


Removes a mobile device. Note that this does not break the device's sync, it simply removes it from the list of devices connected to the domain. If the device still has a valid login/authentication, it will be added back on it's next successful sync.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user.readonly https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/cloud-platform

Base Command#

gsuite-mobile-delete

Input#

Argument NameDescriptionRequired
customer_idThe unique ID of the customer's G Suite account.Optional
resource_idThe unique ID used to identify the mobile device.Required
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-mobile-delete customer_id=my_customer resource_id=AFFIQUAU-Adjghah-rezwed admin_email=adminemail@domain.com

Human Readable Output#

Mobile device with resource id - AFFIQUAU-Adjghah-rezwed deleted.

gsuite-user-alias-add#


Adds an alias.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user.alias https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-alias-add

Input#

Argument NameDescriptionRequired
user_keyIdentifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.Required
aliasThe alias email address.Required
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.UserAlias.kindStringThe type of the API resource.
GSuite.UserAlias.idStringThe unique ID for the user.
GSuite.UserAlias.etagStringETag of the resource.
GSuite.UserAlias.aliasStringThe alias email address.

Command Example#

!gsuite-user-alias-add alias=alias_321@domain.com user_key=demoaccount@domain.com admin_email=user1@domain.com

Context Example#

{
"GSuite": {
"UserAlias": {
"alias": "alias_321@domain.com",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/jJ5Cz1VAIrUEoGZlaiop-HTSKJ4\"",
"id": "108028652821197762751",
"kind": "admin#directory#alias"
}
}
}

Human Readable Output#

Added alias "alias_321@domain.com" to user key "demoaccount@domain.com".

gsuite-user-create#


Creates a user.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-create

Input#

Argument NameDescriptionRequired
first_nameThe user's first name.Required
last_nameThe user's last name.Required
passwordStores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. The password will be sent in MD5 hash format.Required
primary_emailThe user's primary email address. The primary_email must be unique and cannot be an alias of another user.Required
countryUser's Country.Optional
address_typeThe address type.Optional
postal_codeThe ZIP or postal code, if applicable.Optional
is_address_primarySet to true, If this is the user's primary address.Optional
extended_addressFor extended addresses, such as an address that includes a sub-region.Optional
regionThe abbreviated province or state.Optional
street_addressThe street address, such as 1600 Amphitheatre Parkway. Whitespace within the string is ignored; however, newlines are significant.Optional
secondary_email_addressThe user's secondary email address.Optional
secondary_email_typeThe type of the secondary email account.Optional
genderUser's gender.Optional
is_ip_white_listedIf true, the user's IP address is added to allow list.Optional
notes_content_typeContent type of note, either plain text or HTML. If not provided, considered as plain text.Optional
notes_valueContents of notes.Optional
phone_numberA human-readable phone number. It may be in any telephone number format.Optional
phone_number_typeThe type of phone number.Optional
is_phone_number_primaryIndicates if this is the user's primary phone number. A user may only have one primary phone number.Optional
recovery_emailRecovery email of the user.Optional
recovery_phoneRecovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.Optional
suspendedIndicates if the user is suspended.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.User.idStringThe unique ID for the user.
GSuite.User.primaryEmailStringThe user's primary email address.
GSuite.User.firstNameStringThe user's first name.
GSuite.User.lastNameStringThe user's last name.
GSuite.User.customerIdStringThe unique ID for the customer's G Suite account.
GSuite.User.genderStringGender.
GSuite.User.suspendedBooleanIndicates if the user is suspended.
GSuite.User.notesValueStringContents of notes.
GSuite.User.notesContentTypeStringContent type of notes.
GSuite.User.isAdminBooleanIndicates a user with super administrator privileges.
GSuite.User.creationTimeDateThe time the user's account was created.
GSuite.User.phones.valueStringA human-readable phone number. It may be in any telephone number format.
GSuite.User.phones.typeStringThe type of phone number.
GSuite.User.phones.primaryBooleanIndicates if this is the user's primary phone number.
GSuite.User.addresses.typeStringThe address type.
GSuite.User.addresses.countryStringCountry.
GSuite.User.addresses.postalCodeStringThe ZIP or postal code.
GSuite.User.addresses.regionStringThe abbreviated province or state.
GSuite.User.addresses.streetAddressStringThe street address.
GSuite.User.addresses.extendedAddressStringFor extended addresses, such as an address that includes a sub-region.
GSuite.User.addresses.primaryBooleanIf this is the user's primary address.
GSuite.User.emails.addressStringThe user's secondary email.
GSuite.User.emails.typeStringThe secondary email type.
GSuite.User.ipWhitelistedBooleanIf true, the user's IP address is added to allow list.
GSuite.User.recoveryEmailStringRecovery email of the user.
GSuite.User.isDelegatedAdminBooleanIndicates if the user is a delegated administrator.
GSuite.User.recoveryPhoneStringRecovery phone of the user.
GSuite.User.orgUnitPathStringThe 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 (/).
GSuite.User.isMailboxSetupBooleanIndicates if the user's Google mailbox is created.
GSuite.User.kindBooleanThe type of the API resource.
GSuite.User.etagBooleanETag of the resource.
GSuite.User.hashFunctionStringStores the hash format of the password property.

Command Example#

!gsuite-user-create admin_email=adminemail@domain.com first_name="new" last_name="user" primary_email="new.user@domain.com" password="user@123"

Context Example#

{
"GSuite":{
"User": {
"creationTime": "2020-09-22T11:26:26.000Z",
"customerId": "C03puekhd",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/4tvQSgzvpG3jXKVblT3Ey-0_slk\"",
"firstName": "new",
"hashFunction": "MD5",
"id": "111364427621472798290",
"isAdmin": false,
"isDelegatedAdmin": false,
"isMailboxSetup": false,
"kind": "admin#directory#user",
"lastName": "user",
"orgUnitPath": "/",
"primaryEmail": "new.user@domain.com"
}
}
}

Human Readable Output#

User Details#

IdCustomer IdPrimary EmailFirst NameLast NameIs AdminCreation Time
111364427621472798290C03puekhdnew.user@domain.comnewuserfalse2020-09-22T11:26:26.000Z

gsuite-group-create#


Creates a group with a group name and its description.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.group

Base Command#

gsuite-group-create

Input#

Argument NameDescriptionRequired
group_emailThe group's email address.Required
group_nameThe group's display name.Optional
group_descriptionAn extended description to help users determine the purpose of a group.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.Group.kindStringThe type of the API resource.
GSuite.Group.idStringThe unique ID of a group.
GSuite.Group.etagStringETag of the resource.
GSuite.Group.emailStringThe group's email address.
GSuite.Group.nameStringThe group's display name.
GSuite.Group.directMembersCountStringThe number of users that are direct members of the group.
GSuite.Group.descriptionStringAn extended description to help users determine the purpose of a group.
GSuite.Group.adminCreatedBooleanValue is true if this group was created by an administrator rather than a user.
GSuite.Group.aliasesStringList of a group's alias email addresses.
GSuite.Group.nonEditableAliasesStringList of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains.

Command Example#

!gsuite-group-create group_email="testsgroup@domain.com" admin_email=adminemail@domain.com group_description="group description"

Context Example#

{
"GSuite": {
"Group": {
"adminCreated": true,
"description": "group description",
"email": "testsgroup@domain.com",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/LI8IDdZB9k7tBdClkZja0jnTX9k\"",
"id": "017dp8vu2zdcnpe",
"kind": "admin#directory#group",
"name": "testsgroup"
}
}
}

Human Readable Output#

A new group named "testsgroup" created.#

IdEmailDescriptionAdmin Created
017dp8vu2zdcnpetestsgroup@domain.comgroup descriptiontrue

gsuite-role-assignment-list#


Retrieves a paginated list of all role assignments.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly https://www.googleapis.com/auth/admin.directory.rolemanagement

Base Command#

gsuite-role-assignment-list

Input#

Argument NameDescriptionRequired
customer_idImmutable ID of the G Suite account.Optional
role_idImmutable ID of a role. If included, it returns only role assignments containing this role ID.Optional
user_keyThe user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.Optional
page_tokenToken to specify the next page in the list.Optional
max_resultsMaximum number of results to return. Acceptable values are 1 to 200, inclusive.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.RoleAssignment.kindStringThe type of the API resource.
GSuite.RoleAssignment.etagStringETag of the resource.
GSuite.RoleAssignment.roleAssignmentIdNumberID of this role assignment.
GSuite.RoleAssignment.roleIdNumberThe ID of the role that is assigned.
GSuite.RoleAssignment.assignedToStringThe unique ID of the user this role is assigned to.
GSuite.RoleAssignment.scopeTypeStringThe scope in which this role is assigned.
GSuite.RoleAssignment.orgUnitIdStringIf the role is restricted to an organization unit, this contains the ID of the organization unit to which the exercise of this role is restricted to.
GSuite.PageToken.RoleAssignment.nextPageTokenStringToken to specify the next page in the list.

Command Example#

!gsuite-role-assignment-list customer_id=my_customer admin_email=adminemail@domain.com max_results=2 user_key=112697610

Context Example#

{
"GSuite": {
"PageToken": {
"RoleAssignment": {
"nextPageToken": "1380118834"
}
},
"RoleAssignment": [
{
"assignedTo": "112697610",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/HNRTxaa_Vj5uoXcenlvlCaLm5ZM\"",
"kind": "admin#directory#roleAssignment",
"roleAssignmentId": "1380118833",
"roleId": "1380118839",
"scopeType": "CUSTOMER"
},
{
"assignedTo": "112697610",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/AjrcWjoYFdv8ZnxLMYDX7UhbA3w\"",
"kind": "admin#directory#roleAssignment",
"roleAssignmentId": "1380118834",
"roleId": "1380118838",
"scopeType": "CUSTOMER"
}
]
}
}

Human Readable Output#

Next Page Token: 1380118834#

Total Retrieved Role Assignment(s): 2#

Role Assignment IdRole IdAssigned ToScope Type
13801188331380118839112697610CUSTOMER
13801188341380118838112697610CUSTOMER

gsuite-role-assignment-create#


Creates a role assignment.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.rolemanagement

Base Command#

gsuite-role-assignment-create

Input#

Argument NameDescriptionRequired
customer_idImmutable ID of the G Suite account.Optional
role_idThe ID of the role to be assigned to the user.Required
assigned_toThe unique ID of the user this role is assigned to.Required
scope_typeThe scope in which this role is assigned.Required
org_unit_idIf the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.RoleAssignment.kindStringThe type of the API resource.
GSuite.RoleAssignment.etagStringETag of the resource.
GSuite.RoleAssignment.roleAssignmentIdNumberID of this role assignment.
GSuite.RoleAssignment.roleIdNumberThe ID of the role that is assigned.
GSuite.RoleAssignment.assignedToStringThe unique ID of the user this role is assigned to.
GSuite.RoleAssignment.scopeTypeStringThe scope in which this role is assigned.
GSuite.RoleAssignment.orgUnitIdStringIf the role is restricted to an organization unit, this contains the ID of the organization unit to which the exercise of this role is restricted to.

Command Example#

!gsuite-role-assignment-create assigned_to=112697610 customer_id=my_customer role_id=13801188331880450 scope_type=CUSTOMER admin_email=adminemail@domain.com

Context Example#

{
"GSuite": {
"RoleAssignment": {
"assignedTo": "112697610",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/bSzQO50Ycd4Fn6ibBqIioX4qhj0\"",
"kind": "admin#directory#roleAssignment",
"roleAssignmentId": "331880504",
"roleId": "13801188331880450",
"scopeType": "CUSTOMER"
}
}
}

Human Readable Output#

Role Assignment Details#

Role Assignment IdRole IdAssigned ToScope Type
33188050413801188331880450112697610CUSTOMER

gsuite-role-create#


Creates a new role.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.rolemanagement

Base Command#

gsuite-role-create

Input#

Argument NameDescriptionRequired
customer_idImmutable ID of the G Suite account.Optional
role_nameName of the role.Required
role_privilegesThe set of privileges that are granted to this role. Comma-separated list of privilege names and service ids of the form "PrivilegeName1:ServiceId1,PrivilegeName2:ServiceId2".Required
role_descriptionA short description of the role.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

PathTypeDescription
GSuite.Role.kindStringThe type of the API resource. This is always admin#directory#role.
GSuite.Role.etagStringETag of the resource.
GSuite.Role.roleIdNumberID of the role.
GSuite.Role.roleNameStringName of the role.
GSuite.Role.roleDescriptionStringA short description of the role.
GSuite.Role.rolePrivileges.privilegeNameStringThe name of the privilege.
GSuite.Role.rolePrivileges.serviceIdStringThe obfuscated ID of the service this privilege is for.
GSuite.Role.isSystemRoleBooleanWhether this is a pre-defined system role.
GSuite.Role.isSuperAdminRoleBooleanWhether the role is a super admin role.

Command Example#

!gsuite-role-create customer_id=my_customer role_name role_privileges="PRIVILEGE_NAME:service_id"
admin_email=admin@domain.com

Context Example#

{
"GSuite": {
"Role": {
"kind": "admin#directory#role",
"etag": "\"XVqXMfEoKXKeCEJHh6Z_d9s0pNqKA90jMskGKajpbM8/JL5ppEimKvC4Ue7Bfhb0qv7Ahqw\"",
"roleId": "13801188331880469",
"roleName": "role_22345",
"rolePrivileges": [
{
"privilegeName": "PRIVILEGE_NAME",
"serviceId": "service_id"
}
]
}
}
}

Human Readable Output#

A new role created.#

IdNamePrivileges
13801188331880469role_22345PRIVILEGE_NAME: service_id

gsuite-token-revoke#


Delete all access tokens issued by a user for an application.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user.security

Base Command#

gsuite-token-revoke

Input#

Argument NameDescriptionRequired
client_idThe Client ID of the application the token is issued to.Required
user_keyIdentifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.Required
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-token-revoke client_id=297408095146-fug707qsjv4ikron0hugpevbrjhkmsk7.apps.googleusercontent.com user_key=user1@domain.com admin_email=adminemail@domain.com

Human Readable Output#

All access tokens deleted for 297408095146-fug707qsjv4ikron0hugpevbrjhkmsk7.apps.googleusercontent.com.

gsuite-user-signout#


Signs a user out of all web and device sessions and reset their sign-in cookies.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user.security

Base Command#

gsuite-user-signout

Input#

Argument NameDescriptionRequired
user_keyIdentifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.Required

Context Output#

There is no context output for this command.

gsuite-datatransfer-list#


Lists the transfers for a customer by source user, destination user, or status.

Required Permissions#

https://www.googleapis.com/auth/admin.datatransfer https://www.googleapis.com/auth/admin.datatransfer.readonly

Base Command#

gsuite-datatransfer-list

Input#

Argument NameDescriptionRequired
customer_idImmutable ID of the G Suite account.Optional
new_owner_user_idDestination user's profile ID.Optional
old_owner_user_idSource user's profile ID.Optional
statusStatus of the transfer.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
max_resultsMaximum number of results to return. Default is 100. Acceptable values are 1 to 500, inclusive.Optional
page_tokenToken to specify the next page in the list.Optional

Context Output#

PathTypeDescription
GSuite.DataTransfer.kindStringIdentifies the resource as a DataTransfer request.
GSuite.DataTransfer.etagStringETag of the resource.
GSuite.DataTransfer.idStringThe transfer's ID.
GSuite.DataTransfer.oldOwnerUserIdStringID of the user whose data is being transferred.
GSuite.DataTransfer.newOwnerUserIdStringID of the user to whom the data is being transferred.
GSuite.DataTransfer.overallTransferStatusCodeStringOverall transfer status.
GSuite.DataTransfer.requestTimeDateThe time at which the data transfer was requested.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferStatusStringCurrent status of transfer for this application.
GSuite.DataTransfer.applicationDataTransfers.applicationIdNumberThe application's ID.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferParams.keyStringThe type of the transfer parameter.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferParams.valueUnknownThe value of the corresponding transfer parameter.
GSuite.PageToken.DataTransfer.nextPageTokenStringContinuation token which will be used to specify next page in list API.

Command Example#

!gsuite-datatransfer-list admin_email=adminemail@domain.com customer_id=my_customer max_results=2

Context Example#

{
"GSuite": {
"DataTransfer": [
{
"applicationDataTransfers": [
{
"applicationId": "55656082996",
"applicationTransferParams": [
{
"key": "PRIVACY_LEVEL",
"value": [
"PRIVATE",
"SHARED"
]
}
],
"applicationTransferStatus": "completed"
}
],
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/a30QB7XJOzBUhwPRCWCP1g2o7do\"",
"id": "AKrEtIYG88pek5zyrIzBx7kV5g4JNiUshLFkMbPUYKXsTgRGIJvAyjpzpti9I38WXJ70t6ef0fUIx0EM82KfN_PPP7KKNfHeSQ",
"kind": "admin#datatransfer#DataTransfer",
"newOwnerUserId": "103744886667034914950",
"oldOwnerUserId": "111046242590772774691",
"overallTransferStatusCode": "completed",
"requestTime": "2020-09-14T06:30:55.672Z"
},
{
"applicationDataTransfers": [
{
"applicationId": "55656082996",
"applicationTransferParams": [
{
"key": "PRIVACY_LEVEL",
"value": [
"PRIVATE",
"SHARED"
]
}
],
"applicationTransferStatus": "completed"
}
],
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/SAQmSzZJLc6bhvvGfKFwlvsd_Fg\"",
"id": "AKrEtIYG88pek5zyrIzBx7kV5g4Jha32YbTTHrbqLTPGaiqmLKuA3WFU7zyxmmkwUrGZcf73dt4SAcDmj5_GeCgoCRFJWbyIxg",
"kind": "admin#datatransfer#DataTransfer",
"newOwnerUserId": "103744886667034914950",
"oldOwnerUserId": "111046242590772774691",
"overallTransferStatusCode": "completed",
"requestTime": "2020-09-14T06:31:01.051Z"
}
],
"PageToken": {
"DataTransfer": {
"nextPageToken": "AKrEtIYG88pek5zyrIzBx7kV5g4Jha32YbTTHrbqLTPGaiqmLKuA3WFU7zyxmmkwUrGZcf73dt4SAcDmj5_GeCgoCRFJWbyIxg"
}
}
}
}

Human Readable Output#

Next Page Token: AKrEtIYG88pek5zyrIzBx7kV5g4Jha32YbTTHrbqLTPGaiqmLKuA3WFU7zyxmmkwUrGZcf73dt4SAcDmj5_GeCgoCRFJWbyIxg#

Total Retrieved Data Transfers: 2#

IdOld Owner User IdNew Owner User IdOverall Transfer Status CodeRequest TimeApplication Data Transfers
AKrEtIYG88pek5zyrIzBx7kV5g4JNiUshLFkMbPUYKXsTgRGIJvAyjpzpti9I38WXJ70t6ef0fUIx0EM82KfN_PPP7KKNfHeSQ111046242590772774691103744886667034914950completed2020-09-14T06:30:55.672ZApplication Id: 55656082996
Application Transfer Status: completed

AKrEtIYG88pek5zyrIzBx7kV5g4Jha32YbTTHrbqLTPGaiqmLKuA3WFU7zyxmmkwUrGZcf73dt4SAcDmj5_GeCgoCRFJWbyIxg111046242590772774691103744886667034914950completed2020-09-14T06:31:01.051ZApplication Id: 55656082996
Application Transfer Status: completed

gsuite-custom-user-schema-create#


Creates a custom user schema to add custom fields to user profiles. Note: field_raw_json has higher precedence when both field_raw_json and field_json_entry_id are provided.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.userschema

Base Command#

gsuite-custom-user-schema-create

Input#

Argument NameDescriptionRequired
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
customer_idImmutable ID of the G Suite account.Optional
schema_nameThe schema's name.Required
schema_display_nameDisplay name for the schema.Required
field_raw_jsonRaw JSON containing fields of the schema. Acceptable values for
fieldType are BOOL, DATE, DOUBLE, EMAIL, INT64, PHONE, and STRING. Acceptable
values for readAccessType are ADMINS_AND_SELF- Only administrators and
the associated user can see values, and ALL_DOMAIN_USERS- Any user in
your domain can see values.
E.g.
{
"fields": [
{
"fieldType": string,
"fieldName": string,
"displayName": string,
"multiValued": boolean,
"readAccessType": string,
"indexed": boolean,
"numericIndexingSpec": {
"minValue": double,
"maxValue": double
}
}
]
}
Optional
field_json_entry_idJSON file entry ID containing fields of the schema. Acceptable values for
fieldType are BOOL, DATE, DOUBLE, EMAIL, INT64, PHONE, and STRING. Acceptable
values for readAccessType are ADMINS_AND_SELF- Only administrators and
the associated user can see values, and ALL_DOMAIN_USERS- Any user in
your domain can see values.
E.g.
{
"fields": [
{
"fieldType": string,
"fieldName": string,
"displayName": string,
"multiValued": boolean,
"readAccessType": string,
"indexed": boolean,
"numericIndexingSpec": {
"minValue": double,
"maxValue": double
}
}
]
}
Optional

Context Output#

PathTypeDescription
GSuite.UserSchema.kindStringThe type of the API resource.
GSuite.UserSchema.etagStringThe ETag of the resource.
GSuite.UserSchema.schemaIdStringThe unique identifier of the schema.
GSuite.UserSchema.schemaNameStringThe schema's name.
GSuite.UserSchema.displayNameStringDisplay Name for the schema.
GSuite.UserSchema.fields.kindStringThe kind of resource this is.
GSuite.UserSchema.fields.fieldIdStringThe unique identifier of the field.
GSuite.UserSchema.fields.etagStringThe ETag of the field.
GSuite.UserSchema.fields.fieldTypeStringThe type of the field.
GSuite.UserSchema.fields.fieldNameStringThe name of the field.
GSuite.UserSchema.fields.displayNameStringDisplay name of the field.
GSuite.UserSchema.fields.multiValuedBooleanA boolean specifying whether this is a multi-valued field or not.
GSuite.UserSchema.fields.readAccessTypeBooleanSpecifies who can view values of this field.
GSuite.UserSchema.fields.indexedBooleanSpecifies whether the field is indexed or not.
GSuite.UserSchema.fields.numericIndexingSpecMinValueNumberMinimum value of this field.
GSuite.UserSchema.fields.numericIndexingSpecMaxValueNumberMaximum value of this field.

Command Example#

!gsuite-custom-user-schema-create customer_id=my_customer schema_display_name=test44 schema_name=schema_name4 admin_email=adminemail@domain.com field_raw_json="{\"fields\":[{\"fieldType\":\"BOOL\",\"fieldName\":\"surname4\",\"displayName\":\"Surname4\",\"multiValued\":true}]}"

Context Example#

{
"GSuite": {
"UserSchema": {
"displayName": "test44",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/MjPzd5dwc-Ht2kOBcz-U0AZNWFA\"",
"fields": [
{
"displayName": "Surname4",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/O3s2wxQMfyD89C1J8b2M021ICl4\"",
"fieldId": "ltlnHmK5SJGk8zXvNWYA9g==",
"fieldName": "surname4",
"fieldType": "BOOL",
"kind": "admin#directory#schema#fieldspec",
"multiValued": true,
"readAccessType": "ALL_DOMAIN_USERS"
}
],
"kind": "admin#directory#schema",
"schemaId": "5JijaVh6R7ar7zK0u95XSw==",
"schemaName": "schema_name4"
}
}
}

Human Readable Output#

Custom User Schema Details#

Schema Id: 5JijaVh6R7ar7zK0u95XSw== \ Schema Name: schema_name4 \ Schema Display Name: test44

Field Details#

Field IdField NameDisplay NameField TypeRead Access TypeMulti Valued
ltlnHmK5SJGk8zXvNWYA9g==surname4Surname4BOOLALL_DOMAIN_USERStrue

gsuite-custom-user-schema-update#


Updates a custom user schema. Note: field_raw_json has higher precedence when both field_raw_json and field_json_entry_id are provided.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.userschema

Base Command#

gsuite-custom-user-schema-update

Input#

Argument NameDescriptionRequired
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
customer_idImmutable ID of the G Suite account.Optional
schema_nameThe schema's name.Optional
schema_idImmutable ID of the schema.Optional
schema_display_nameDisplay name for the schema.Optional
field_raw_jsonRaw JSON containing fields of the schema. Acceptable values for
fieldType are BOOL, DATE, DOUBLE, EMAIL, INT64, PHONE, and STRING. Acceptable
values for readAccessType are ADMINS_AND_SELF- Only administrators and
the associated user can see values, and ALL_DOMAIN_USERS- Any user in
your domain can see values.
E.g.
{
"fields": [
{
"fieldType": string,
"fieldName": string,
"displayName": string,
"multiValued": boolean,
"readAccessType": string,
"indexed": boolean,
"numericIndexingSpec": {
"minValue": double,
"maxValue": double
}
}
]
}
Optional
field_json_entry_idJSON file entry ID containing fields of the schema. Acceptable values for
fieldType are BOOL, DATE, DOUBLE, EMAIL, INT64, PHONE, and STRING. Acceptable
values for readAccessType are ADMINS_AND_SELF- Only administrators and
the associated user can see values, and ALL_DOMAIN_USERS- Any user in
your domain can see values.
E.g.
{
"fields": [
{
"fieldType": string,
"fieldName": string,
"displayName": string,
"multiValued": boolean,
"readAccessType": string,
"indexed": boolean,
"numericIndexingSpec": {
"minValue": double,
"maxValue": double
}
}
]
}
Optional

Context Output#

PathTypeDescription
GSuite.UserSchema.kindStringThe type of the API resource.
GSuite.UserSchema.etagStringThe ETag of the resource.
GSuite.UserSchema.schemaIdStringThe unique identifier of the schema.
GSuite.UserSchema.schemaNameStringThe schema's name.
GSuite.UserSchema.displayNameStringDisplay Name for the schema.
GSuite.UserSchema.fields.kindStringThe kind of resource this is.
GSuite.UserSchema.fields.fieldIdStringThe unique identifier of the field.
GSuite.UserSchema.fields.etagStringThe ETag of the field.
GSuite.UserSchema.fields.fieldTypeStringThe type of the field.
GSuite.UserSchema.fields.fieldNameStringThe name of the field.
GSuite.UserSchema.fields.displayNameStringDisplay name of the field.
GSuite.UserSchema.fields.multiValuedBooleanA boolean specifying whether this is a multi-valued field or not.
GSuite.UserSchema.fields.readAccessTypeBooleanSpecifies who can view values of this field.
GSuite.UserSchema.fields.indexedBooleanSpecifies whether the field is indexed or not.
GSuite.UserSchema.fields.numericIndexingSpecMinValueNumberMinimum value of this field.
GSuite.UserSchema.fields.numericIndexingSpecMaxValueNumberMaximum value of this field.

Command Example#

!gsuite-custom-user-schema-update customer_id=my_customer admin_email=adminemail@domain.com field_raw_json="{\"fields\":[{\"fieldType\":\"BOOL\",\"fieldName\":\"surname\",\"displayName\":\"Surname\",\"multiValued\":true}]}" schema_id=ZZi9zLU7ROmyBoufhbn9gg== schema_name=test222

Context Example#

{
"GSuite": {
"UserSchema": {
"displayName": "test222",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/T3_i5bZrWyPLStFhy3G4vdhHyws\"",
"fields": [
{
"displayName": "Surname",
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/9vV1znpuuEz23OOT4Vy8K6kMy8A\"",
"fieldId": "cMmMeyLxTKyM-7m7bb9Y_Q==",
"fieldName": "surname",
"fieldType": "BOOL",
"kind": "admin#directory#schema#fieldspec",
"multiValued": true
}
],
"kind": "admin#directory#schema",
"schemaId": "ZZi9zLU7ROmyBoufhbn9gg==",
"schemaName": "test222"
}
}
}

Human Readable Output#

Updated Custom User Schema Details#

Schema Id: ZZi9zLU7ROmyBoufhbn9gg== \ Schema Name: test222 \ Schema Display Name: test222

Field Details#

Field IdField NameDisplay NameField TypeMulti Valued
cMmMeyLxTKyM-7m7bb9Y_Q==surnameSurnameBOOLtrue

gsuite-datatransfer-request-create#


Inserts a data transfer request.

Note: If all three applications_raw_json, applications_raw_json_entry_id and application_id are provided the higher precedence will be in order of applications_raw_json, applications_raw_json_entry_id, and application_id respectively.

Required Permissions#

https://www.googleapis.com/auth/admin.datatransfer

Base Command#

gsuite-datatransfer-request-create

Input#

Argument NameDescriptionRequired
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
old_owner_idID of the user whose data is being transferred.Required
new_owner_idID of the user to whom the data is being transferred.Required
application_idThe application's ID.Optional
application_transfer_paramsKey and value pair of application data transfer parameters. Key and value must be delimited by (:) colon. Multiple values must be delimited by (,) comma. Multiple key-value pairs must be delimited by (;) semi-colon. E.g. key1:val;key2:val1,val2Optional
applications_raw_jsonRaw JSON containing the whole body of the application data transfers.
E.g.
{
"applicationDataTransfers": [
{
"applicationId": long,
"applicationTransferParams": [
{
"key": string,
"value": [
string
]
}
]
}
]
}
Optional
applications_raw_json_entry_idJSON file Entry ID containing the whole body of the application data transfers.
E.g.
{
"applicationDataTransfers": [
{
"applicationId": long,
"applicationTransferParams": [
{
"key": string,
"value": [
string
]
}
]
}
]
}
Optional

Context Output#

PathTypeDescription
GSuite.DataTransfer.kindStringIdentifies the resource as a DataTransfer request.
GSuite.DataTransfer.etagStringETag of the resource.
GSuite.DataTransfer.idStringThe transfer's ID.
GSuite.DataTransfer.oldOwnerUserIdStringID of the user whose data is being transferred.
GSuite.DataTransfer.newOwnerUserIdStringID of the user to whom the data is being transferred.
GSuite.DataTransfer.applicationDataTransfers.applicationIdNumberThe application's ID.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferParams.keyStringThe type of the transfer parameter.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferParams.valueUnknownThe value of the corresponding transfer parameter.
GSuite.DataTransfer.applicationDataTransfers.applicationTransferStatusStringCurrent status of transfer for this application.
GSuite.DataTransfer.overallTransferStatusCodeStringOverall transfer status.
GSuite.DataTransfer.requestTimeDateThe time at which the data transfer was requested.

Command Example#

!gsuite-datatransfer-request-create application_id=435070579839 application_transfer_params="RELEASE_RESOURCES:TRUE" new_owner_id=108028652821197762751 old_owner_id=119443780932332

Context Example#

{
"GSuite": {
"DataTransfer": {
"applicationDataTransfers": [
{
"applicationId": "435070579839",
"applicationTransferParams": [
{
"key": "RELEASE_RESOURCES",
"value": [
"TRUE"
]
}
],
"applicationTransferStatus": "pending"
}
],
"etag": "\"kUnwYYg1BVyzlZxLWewcY0fcrpfz6LbI3xDE6gsvPl4/pNKVLr3d6L1hPB8f4CoG08y4sSw\"",
"id": "AKrEtIYCgUCoI7j9IqOCJ2q4HkJUVaZJaYpgSPDEP-GIzkHz3pH1CQuBa-P38vqhSOSuKcJOwPT8GSKhTGDqOw8vJt8FQeTL8Q",
"kind": "admin#datatransfer#DataTransfer",
"newOwnerUserId": "108028652821197762751",
"oldOwnerUserId": "119443780932332",
"overallTransferStatusCode": "inProgress",
"requestTime": "2020-09-22T07:44:44.473Z"
}
}
}

Human Readable Output#

Data transfer request inserted successfully.#

IdOld Owner User IdNew Owner User IdOverall Transfer Status CodeRequest TimeApplication Data Transfers
AKrEtIYCgUCoI7j9IqOCJ2q4HkJUVaZJaYpgSPDEP-GIzkHz3pH1CQuBa-P38vqhSOSuKcJOwPT8GSKhTGDqOw8vJt8FQeTL8Q119443780932332108028652821197762751inProgress2020-09-22T07:44:44.473ZApplication Id: 435070579839,
Application Transfer Status: pending

gsuite-user-update#


Updates a user.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-update

Input#

Argument NameDescriptionRequired
first_nameThe user's first name.Optional
last_nameThe user's last name.Optional
passwordStores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. The password will be sent in MD5 hash format.Optional
primary_emailThe user's primary email address. The primary_email must be unique and cannot be an alias of another user.Optional
countryUser's Country.Optional
address_typeThe address type.Optional
postal_codeThe ZIP or postal code, if applicable.Optional
is_address_primarySet to true, If this is the user's primary address.Optional
extended_addressFor extended addresses, such as an address that includes a sub-region.Optional
regionThe abbreviated province or state.Optional
street_addressThe street address, such as 1600 Amphitheatre Parkway. Whitespace within the string is ignored; however, newlines are significant.Optional
secondary_email_addressThe user's secondary email address.Optional
secondary_email_typeThe type of the secondary email account.Optional
genderUser's gender.Optional
is_ip_white_listedIf true, the user's IP address is added to allow list.Optional
notes_content_typeContent type of note, either plain text or HTML. If not provided, considered as plain text.Optional
notes_valueContents of notes.Optional
phone_numberA human-readable phone number. It may be in any telephone number format.Optional
phone_number_typeThe type of phone number.Optional
is_phone_number_primaryIndicates if this is the user's primary phone number. A user may only have one primary phone number.Optional
recovery_emailRecovery email of the user.Optional
recovery_phoneRecovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.Optional
suspendedIndicates if the user is suspended.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
user_keyIdentifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.Required
archivedIndicates if the user is archived.Optional
org_unit_pathTo move the user to OU (Organization Unit). 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 (/).Optional

Context Output#

PathTypeDescription
GSuite.User.idStringThe unique ID for the user.
GSuite.User.primaryEmailStringThe user's primary email address.
GSuite.User.firstNameStringThe user's first name.
GSuite.User.lastNameStringThe user's last name.
GSuite.User.customerIdStringThe unique ID for the customer's G Suite account.
GSuite.User.genderStringGender.
GSuite.User.suspendedBooleanIndicates if the user is suspended.
GSuite.User.notesValueStringContents of notes.
GSuite.User.notesContentTypeStringContent type of notes.
GSuite.User.isAdminBooleanIndicates a user with super administrator privileges.
GSuite.User.creationTimeDateThe time the user's account was created.
GSuite.User.phones.valueStringA human-readable phone number. It may be in any telephone number format.
GSuite.User.phones.typeStringThe type of phone number.
GSuite.User.phones.primaryBooleanIndicates if this is the user's primary phone number.
GSuite.User.phones.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.addresses.typeStringThe address type.
GSuite.User.addresses.customTypeStringIf the address type is custom, this property contains the custom value.
GSuite.User.addresses.sourceIsStructuredBooleanIndicates if the user-supplied address was formatted. Formatted addresses are not currently supported.
GSuite.User.addresses.formattedStringA full and unstructured postal address. This is not synced with the structured address fields.
GSuite.User.addresses.poBoxStringThe post office box, if present.
GSuite.User.addresses.localityStringThe town or city of the address.
GSuite.User.addresses.countryCodeStringThe country code. Uses the ISO 3166-1 standard.
GSuite.User.addresses.countryStringCountry.
GSuite.User.addresses.postalCodeStringThe ZIP or postal code.
GSuite.User.addresses.regionStringThe abbreviated province or state.
GSuite.User.addresses.streetAddressStringThe street address.
GSuite.User.addresses.extendedAddressStringFor extended addresses, such as an address that includes a sub-region.
GSuite.User.addresses.primaryBooleanIf this is the user's primary address.
GSuite.User.emails.addressStringThe user's secondary email.
GSuite.User.emails.typeStringThe secondary email type.
GSuite.User.emails.customTypeStringIf the value of type is custom, this property contains the custom type string.
GSuite.User.emails.primaryBooleanIndicates if this is the user's primary email. Only one entry can be marked as primary.
GSuite.User.ipWhitelistedBooleanIf true, the user's IP address is added.
GSuite.User.recoveryEmailStringRecovery email of the user.
GSuite.User.isDelegatedAdminBooleanIndicates if the user is a delegated administrator.
GSuite.User.recoveryPhoneStringRecovery phone of the user.
GSuite.User.orgUnitPathStringThe 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 (/).
GSuite.User.isMailboxSetupBooleanIndicates if the user's Google mailbox is created.
GSuite.User.kindBooleanThe type of the API resource.
GSuite.User.etagBooleanETag of the resource.
GSuite.User.hashFunctionStringStores the hash format of the password property.
GSuite.User.archivedBooleanIndicates if the user is archived.
GSuite.User.fullNameStringThe user's full name formed by concatenating the first and last name values.
GSuite.User.lastLoginTimeDateThe last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
GSuite.User.deletionTimeDateThe time the user's account was deleted. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
GSuite.User.agreedToTermsBooleanThis property is true if the user has completed an initial login and accepted the Terms of Service agreement.
GSuite.User.suspensionReasonStringHas 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.
GSuite.User.changePasswordAtNextLoginBooleanIndicates 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.
GSuite.User.ims.typeBooleanType of the user's Instant Messenger (IM) account.
GSuite.User.ims.customTypeStringIf the IM type is custom, this property holds the custom type string.
GSuite.User.ims.protocolStringAn IM protocol identifies the IM network. The value can be a custom network or the standard network.
GSuite.User.ims.customProtocolStringIf the protocol value is custom_protocol, this property holds the custom protocol's string.
GSuite.User.ims.imStringThe user's IM network ID.
GSuite.User.ims.primaryBooleanIf this is the user's primary IM. Only one entry in the IM list can have a value of true.
GSuite.User.externalIds.valueStringThe value of the external ID.
GSuite.User.externalIds.typeStringThe type of the external ID.
GSuite.User.externalIds.customTypeStringIf the external ID type is custom, this property holds the custom type.
GSuite.User.relations.valueStringThe name of the person the user is related to.
GSuite.User.relations.typeStringThe type of relation.
GSuite.User.relations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.nameStringThe name of the organization.
GSuite.User.organizations.titleStringThe user's title within the organization, for example 'member' or 'engineer'.
GSuite.User.organizations.primaryBooleanIndicates if this is the user's primary organization. A user may only have one primary organization.
GSuite.User.organizations.typeStringThe type of organization.
GSuite.User.organizations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.departmentStringSpecifies the department within the organization, such as 'sales' or 'engineering'.
GSuite.User.organizations.symbolStringText string symbol of the organization. For example, the text symbol for Google is GOOG.
GSuite.User.organizations.locationStringThe physical location of the organization. This does not need to be a fully qualified address.
GSuite.User.organizations.descriptionStringThe description of the organization.
GSuite.User.organizations.domainStringThe domain the organization belongs to.
GSuite.User.organizations.costCenterStringThe cost center of the user's organization.
GSuite.User.organizations.fullTimeEquivalentStringThe full-time equivalent millipercent within the organization (100000 = 100%).
GSuite.User.languages.languageCodeStringLanguage Code. Should be used for storing Google III LanguageCode string representation for language. Illegal values cause SchemaException.
GSuite.User.languages.customLanguageStringOther language. A user can provide their own language name if there is no corresponding Google III language code. If this is set, LanguageCode can't be set.
GSuite.User.posixAccounts.usernameStringThe username of the account.
GSuite.User.posixAccounts.uidNumberThe POSIX compliant user ID.
GSuite.User.posixAccounts.gidNumberThe default group ID.
GSuite.User.posixAccounts.homeDirectoryStringThe path to the home directory for this account.
GSuite.User.posixAccounts.shellStringThe path to the login shell for this account.
GSuite.User.posixAccounts.gecosStringThe GECOS (user information) for this account.
GSuite.User.posixAccounts.systemIdStringSystem identifier for which account Username or Uid apply to.
GSuite.User.posixAccounts.primaryBooleanIf this is user's primary account within the SystemId.
GSuite.User.posixAccounts.accountIdStringA POSIX account field identifier.
GSuite.User.posixAccounts.operatingSystemTypeStringThe operating system type for this account.
GSuite.User.sshPublicKeys.keyStringAn SSH public key.
GSuite.User.sshPublicKeys.expirationTimeUsecStringAn expiration time in microseconds since epoch.
GSuite.User.sshPublicKeys.fingerprintStringA SHA-256 fingerprint of the SSH public key.
GSuite.User.aliasesUnknownList of the user's alias email addresses.
GSuite.User.nonEditableAliasesUnknownList of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
GSuite.User.websites.valueStringThe URL of the website.
GSuite.User.websites.primaryBooleanIf this is user's primary website or not.
GSuite.User.websites.typeStringThe type or purpose of the website. For example, a website could be labeled as home or blog. Alternatively, an entry can have a custom type.
GSuite.User.websites.customTypeStringThe custom type. Only used if the type is custom.
GSuite.User.locations.typeStringThe location type.
GSuite.User.locations.customTypeStringIf the location type is custom, this property contains the custom value.
GSuite.User.locations.areaStringTextual location. This is most useful for display purposes to concisely describe the location. For example, "Mountain View, CA", "Near Seattle".
GSuite.User.locations.buildingIdStringBuilding identifier.
GSuite.User.locations.floorNameStringFloor name/number.
GSuite.User.locations.floorSectionStringFloor section. More specific location within the floor. For example, if a floor is divided into sections "A", "B", and "C", this field would identify one of those values.
GSuite.User.locations.deskCodeStringMost specific textual code of individual desk location.
GSuite.User.keywords.typeStringEach entry can have a type which indicates standard type of that entry. For example, keyword could be of type occupation or outlook. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.
GSuite.User.keywords.customTypeStringCustom Type.
GSuite.User.keywords.valueStringKeyword.
GSuite.User.isEnrolledIn2SvBooleanIs enrolled in 2-step verification.
GSuite.User.isEnforcedIn2SvBooleanIs 2-step verification enforced.
GSuite.User.includeInGlobalAddressListBooleanIndicates if the user's profile is visible in the G Suite global address list when the contact sharing feature is enabled for the domain.
GSuite.User.thumbnailPhotoUrlStringPhoto Url of the user.
GSuite.User.thumbnailPhotoEtagStringETag of the user's photo.
GSuite.User.customSchemasUnknownCustom fields of the user.

Command Example#

!gsuite-user-update first_name="test" last_name="user" user_key="test@domain.io"

Context Example#

{
"GSuite": {
"User": {
"agreedToTerms": true,
"archived": false,
"changePasswordAtNextLogin": false,
"creationTime": "2020-09-19T13:43:57.000Z",
"customerId": "C03puekhd",
"emails": [
{
"address": "test1@domain.io",
"type": "custom"
},
{
"address": "test@domain.io",
"primary": true
},
{
"address": "fetch.incident@nimbledata.io.test-google-a.com"
}
],
"etag": "\"9T9vzOl0oqU3TCQ3eSvkwrTkXlbD64F_wxS6Ylj40QU/GKWilUYP3FNjmD4oxz40br3JKWc\"",
"firstName": "test",
"id": "113716761692464219843",
"includeInGlobalAddressList": true,
"ipWhitelisted": false,
"isAdmin": false,
"isDelegatedAdmin": false,
"isMailboxSetup": true,
"kind": "admin#directory#user",
"lastLoginTime": "2020-10-02T04:59:48.000Z",
"lastName": "user",
"nonEditableAliases": [
"test@domain.io.test-google-a.com"
],
"orgUnitPath": "/",
"primaryEmail": "test@domain.io",
"suspended": false
}
}
}

Human Readable Output#

Updated User Details#

IdCustomer IdPrimary EmailFirst NameLast NameArchivedSuspendedOrg Unit PathIs AdminCreation TimeSecondary Email DetailsIp Whitelisted
113716761692464219843C03puekhdtest@domain.iotestuserfalsefalse/false2020-09-19T13:43:57.000ZAddress: test1@nimbledata.io
Type: custom
false

gsuite-user-delete#


Deletes a user.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-delete

Input#

Argument NameDescriptionRequired
user_keyIdentifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.Required
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-user-delete user_key=user.test@domain.io

Human Readable Output#

User with user key user.test@domain.io deleted successfully.

gsuite-group-get#


Retreive a group's details given a group key.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.group

Base Command#

gsuite-group-get

Input#

Argument NameDescriptionRequired
groupOne of the following: group email address, group alias, or the unique group ID.Required

Context Output#

PathTypeDescription
GSuite.Group.kindStringThe type of the API resource.
GSuite.Group.idStringThe unique ID of a group.
GSuite.Group.etagStringETag of the resource.
GSuite.Group.emailStringThe group's email address.
GSuite.Group.nameStringThe group's display name.
GSuite.Group.directMembersCountStringThe number of users that are direct members of the group.
GSuite.Group.descriptionStringAn extended description to help users determine the purpose of a group.
GSuite.Group.adminCreatedBooleanValue is true if this group was created by an administrator rather than a user.
GSuite.Group.aliasesStringList of a group's alias email addresses.
GSuite.Group.nonEditableAliasesStringList of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains.

Command example#

!gsuite-group-get group=test-group@demistodev.com

Context Example#

{
"GSuite": {
"Group": {
"adminCreated": true,
"description": "Test Group",
"directMembersCount": "1",
"email": "test-group@demistodev.com",
"etag": "example_etag",
"id": "example_id",
"kind": "admin#directory#group",
"name": "Test Group",
"nonEditableAliases": [
"test-group@demistodev.com.test-google-a.com"
]
}
}
}

Human Readable Output#

Found group named "Atlassian Test Group" .#

IdEmailDescriptionAdmin Created
example_idtest-group@demistodev.comTest Grouptrue

gsuite-user-get#


Retrieve a user's details given a user key

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-get

Input#

Argument NameDescriptionRequired
userOne of the following: user email address, alias email address, or the unique user ID.Required

Context Output#

PathTypeDescription
GSuite.User.idStringThe unique ID for the user.
GSuite.User.primaryEmailStringThe user's primary email address.
GSuite.User.firstNameStringThe user's first name.
GSuite.User.lastNameStringThe user's last name.
GSuite.User.customerIdStringThe unique ID for the customer's G Suite account.
GSuite.User.genderStringGender.
GSuite.User.suspendedBooleanIndicates if the user is suspended.
GSuite.User.notesValueStringContents of notes.
GSuite.User.notesContentTypeStringContent type of notes.
GSuite.User.isAdminBooleanIndicates a user with super administrator privileges.
GSuite.User.creationTimeDateThe time the user's account was created.
GSuite.User.phones.valueStringA human-readable phone number. It may be in any telephone number format.
GSuite.User.phones.typeStringThe type of phone number.
GSuite.User.phones.primaryBooleanIndicates if this is the user's primary phone number.
GSuite.User.phones.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.addresses.typeStringThe address type.
GSuite.User.addresses.customTypeStringIf the address type is custom, this property contains the custom value.
GSuite.User.addresses.sourceIsStructuredBooleanIndicates if the user-supplied address was formatted. Formatted addresses are not currently supported.
GSuite.User.addresses.formattedStringA full and unstructured postal address. This is not synced with the structured address fields.
GSuite.User.addresses.poBoxStringThe post office box, if present.
GSuite.User.addresses.localityStringThe town or city of the address.
GSuite.User.addresses.countryCodeStringThe country code. Uses the ISO 3166-1 standard.
GSuite.User.addresses.countryStringCountry.
GSuite.User.addresses.postalCodeStringThe ZIP or postal code.
GSuite.User.addresses.regionStringThe abbreviated province or state.
GSuite.User.addresses.streetAddressStringThe street address.
GSuite.User.addresses.extendedAddressStringFor extended addresses, such as an address that includes a sub-region.
GSuite.User.addresses.primaryBooleanIf this is the user's primary address.
GSuite.User.emails.addressStringThe user's secondary email.
GSuite.User.emails.typeStringThe secondary email type.
GSuite.User.emails.customTypeStringIf the value of type is custom, this property contains the custom type string.
GSuite.User.emails.primaryBooleanIndicates if this is the user's primary email. Only one entry can be marked as primary.
GSuite.User.ipWhitelistedBooleanIf true, the user's IP address is added to allow list.
GSuite.User.recoveryEmailStringRecovery email of the user.
GSuite.User.isDelegatedAdminBooleanIndicates if the user is a delegated administrator.
GSuite.User.recoveryPhoneStringRecovery phone of the user.
GSuite.User.orgUnitPathStringThe 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 (/).
GSuite.User.isMailboxSetupBooleanIndicates if the user's Google mailbox is created.
GSuite.User.kindBooleanThe type of the API resource.
GSuite.User.etagBooleanETag of the resource.
GSuite.User.hashFunctionStringStores the hash format of the password property.
GSuite.User.archivedBooleanIndicates if the user is archived.
GSuite.User.fullNameStringThe user's full name formed by concatenating the first and last name values.
GSuite.User.lastLoginTimeDateThe last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
GSuite.User.deletionTimeDateThe time the user's account was deleted. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
GSuite.User.agreedToTermsBooleanThis property is true if the user has completed an initial login and accepted the Terms of Service agreement.
GSuite.User.suspensionReasonStringHas 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.
GSuite.User.changePasswordAtNextLoginBooleanIndicates 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.
GSuite.User.ims.typeBooleanType of the user's Instant Messenger (IM) account.
GSuite.User.ims.customTypeStringIf the IM type is custom, this property holds the custom type string.
GSuite.User.ims.protocolStringAn IM protocol identifies the IM network. The value can be a custom network or the standard network.
GSuite.User.ims.customProtocolStringIf the protocol value is custom_protocol, this property holds the custom protocol's string.
GSuite.User.ims.imStringThe user's IM network ID.
GSuite.User.ims.primaryBooleanIf this is the user's primary IM. Only one entry in the IM list can have a value of true.
GSuite.User.externalIds.valueStringThe value of the external ID.
GSuite.User.externalIds.typeStringThe type of the external ID.
GSuite.User.externalIds.customTypeStringIf the external ID type is custom, this property holds the custom type.
GSuite.User.relations.valueStringThe name of the person the user is related to.
GSuite.User.relations.typeStringThe type of relation.
GSuite.User.relations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.nameStringThe name of the organization.
GSuite.User.organizations.titleStringThe user's title within the organization, for example 'member' or 'engineer'.
GSuite.User.organizations.primaryBooleanIndicates if this is the user's primary organization. A user may only have one primary organization.
GSuite.User.organizations.typeStringThe type of organization.
GSuite.User.organizations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.departmentStringSpecifies the department within the organization, such as 'sales' or 'engineering'.
GSuite.User.organizations.symbolStringText string symbol of the organization. For example, the text symbol for Google is GOOG.
GSuite.User.organizations.locationStringThe physical location of the organization. This does not need to be a fully qualified address.
GSuite.User.organizations.descriptionStringThe description of the organization.
GSuite.User.organizations.domainStringThe domain the organization belongs to.
GSuite.User.organizations.costCenterStringThe cost center of the user's organization.
GSuite.User.organizations.fullTimeEquivalentStringThe full-time equivalent millipercent within the organization (100000 = 100%).
GSuite.User.languages.languageCodeStringLanguage Code. Should be used for storing Google III LanguageCode string representation for language. Illegal values cause SchemaException.
GSuite.User.languages.customLanguageStringOther language. A user can provide their own language name if there is no corresponding Google III language code. If this is set, LanguageCode can't be set.
GSuite.User.posixAccounts.usernameStringThe username of the account.
GSuite.User.posixAccounts.uidNumberThe POSIX compliant user ID.
GSuite.User.posixAccounts.gidNumberThe default group ID.
GSuite.User.posixAccounts.homeDirectoryStringThe path to the home directory for this account.
GSuite.User.posixAccounts.shellStringThe path to the login shell for this account.
GSuite.User.posixAccounts.gecosStringThe GECOS (user information) for this account.
GSuite.User.posixAccounts.systemIdStringSystem identifier for which account Username or Uid apply to.
GSuite.User.posixAccounts.primaryBooleanIf this is user's primary account within the SystemId.
GSuite.User.posixAccounts.accountIdStringA POSIX account field identifier.
GSuite.User.posixAccounts.operatingSystemTypeStringThe operating system type for this account.
GSuite.User.sshPublicKeys.keyStringAn SSH public key.
GSuite.User.sshPublicKeys.expirationTimeUsecStringAn expiration time in microseconds since epoch.
GSuite.User.sshPublicKeys.fingerprintStringA SHA-256 fingerprint of the SSH public key.
GSuite.User.aliasesUnknownList of the user's alias email addresses.
GSuite.User.nonEditableAliasesUnknownList of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
GSuite.User.websites.valueStringThe URL of the website.
GSuite.User.websites.primaryBooleanIf this is user's primary website or not.
GSuite.User.websites.typeStringThe type or purpose of the website. For example, a website could be labeled as home or blog. Alternatively, an entry can have a custom type.
GSuite.User.websites.customTypeStringThe custom type. Only used if the type is custom.
GSuite.User.locations.typeStringThe location type.
GSuite.User.locations.customTypeStringIf the location type is custom, this property contains the custom value.
GSuite.User.locations.areaStringTextual location. This is most useful for display purposes to concisely describe the location. For example, "Mountain View, CA", "Near Seattle".
GSuite.User.locations.buildingIdStringBuilding identifier.
GSuite.User.locations.floorNameStringFloor name/number.
GSuite.User.locations.floorSectionStringFloor section. More specific location within the floor. For example, if a floor is divided into sections "A", "B", and "C", this field would identify one of those values.
GSuite.User.locations.deskCodeStringMost specific textual code of individual desk location.
GSuite.User.keywords.typeStringEach entry can have a type which indicates standard type of that entry. For example, keyword could be of type occupation or outlook. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.
GSuite.User.keywords.customTypeStringCustom Type.
GSuite.User.keywords.valueStringKeyword.
GSuite.User.isEnrolledIn2SvBooleanIs enrolled in 2-step verification.
GSuite.User.isEnforcedIn2SvBooleanIs 2-step verification enforced.
GSuite.User.includeInGlobalAddressListBooleanIndicates if the user's profile is visible in the G Suite global address list when the contact sharing feature is enabled for the domain.
GSuite.User.thumbnailPhotoUrlStringPhoto Url of the user.
GSuite.User.thumbnailPhotoEtagStringETag of the user's photo.
GSuite.User.customSchemasUnknownCustom fields of the user.

Command example#

!gsuite-user-get user=adminemail@domain.com

Context Example#

{
"GSuite": {
"User": {
"agreedToTerms": true,
"archived": false,
"changePasswordAtNextLogin": false,
"creationTime": "2016-05-18T10:45:01.000Z",
"customerId": "example_customer_id",
"emails": [
{
"address": "adminemail@domain.com",
"primary": true
},
{
"address": "adminemail@domain.com.test-google-a.com"
}
],
"etag": "example_etag",
"firstName": "Example_Name",
"fullName": "Example_Full_Name",
"id": "example_id",
"includeInGlobalAddressList": true,
"ipWhitelisted": false,
"isAdmin": true,
"isDelegatedAdmin": false,
"isEnforcedIn2Sv": false,
"isEnrolledIn2Sv": false,
"isMailboxSetup": true,
"kind": "admin#directory#user",
"languages": [
{
"languageCode": "en",
"preference": "preferred"
}
],
"lastLoginTime": "2022-12-18T09:14:24.000Z",
"lastName": "Example_LastName",
"nonEditableAliases": [
"adminemail@domain.com.test-google-a.com"
],
"orgUnitPath": "/",
"organizations": [
{
"department": "Developers",
"primary": true
}
],
"phones": [
{
"type": "home",
"value": "77777777"
}
],
"primaryEmail": "adminemail@domain.com",
"recoveryEmail": "recovery_email@domain.com",
"recoveryPhone": "+123456789",
"suspended": false,
"thumbnailPhotoEtag": "example_etag",
"thumbnailPhotoUrl": "example_photo_url"
}
}
}

Human Readable Output#

Retrieved details for user adminemail@domain.com#

IdCustomer IdPrimary EmailFirst NameLast NameArchivedSuspendedOrg Unit PathIs AdminCreation TimePhone DetailsSecondary Email DetailsIp WhitelistedRecovery EmailRecovery Phone
103020731686044834269C02f0zfqwadminemail@domain.comTomerMalachefalsefalse/true2016-05-18T10:45:01.000ZValue: 77777777
Type: home
Address: adminemail@domain.com
Primary: True
falsetmalache@paloaltonetworks.com+972545429435

google-mobiledevice-list#


Retrieves a paginated list that includes company-owned mobile devices.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.mobile.readonly

Base Command#

gsuite-mobiledevice-list

Input#

Argument NameDescriptionRequired
customer_idThe unique ID of the customer's Google Workspace Admin account.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
projectionWhether to show all metadata fields, or only the basic metadata fields (e.g., deviceId, model, type, and status). Default is FULL. Possible values are: BASIC, FULL.Optional
querySearch string using the format given at https://developers.google.com/admin-sdk/directory/v1/search-operators.Optional
order_byDevice property to use for sorting results. Default is STATUS. Possible values are: DEVICE_ID, EMAIL, LAST_SYNC, MODEL, NAME, OS, STATUS, TYPE.Optional
sort_orderWhether to return results in ascending or descending order. Must be used with the order_by parameter. Default is ASCENDING. Possible values are: ASCENDING, DESCENDING.Optional
limitThe maximum number of records to return from the collection. The default value is 50.Optional
page_tokenThe token of the page.Optional
page_sizeThe number of requested results per page. The default value is 50. Max allowed value is 100.Optional

Context Output#

PathTypeDescription
GSuite.MobileDevices.PageToken.NextPageTokenStringThe token of the next page.
GSuite.MobileDevices.MobileListObjectsObjectA list of Mobile Device objects.
GSuite.MobileDevices.MobileListObjects.kindStringThe type of the API resource.
GSuite.MobileDevices.MobileListObjects.etagStringETag of the resource.
GSuite.MobileDevices.MobileListObjects.resourceIdStringThe unique ID the API service uses to identify the mobile device.
GSuite.MobileDevices.MobileListObjects.deviceIdStringThe serial number for a Google Sync mobile device. For Android and iOS devices, this is a software-generated unique identifier.
GSuite.MobileDevices.MobileListObjects.nameObjectA list of the owner's usernames.
GSuite.MobileDevices.MobileListObjects.emailObjectA list of the owner's email addresses.
GSuite.MobileDevices.MobileListObjects.modelStringThe mobile device's model name.
GSuite.MobileDevices.MobileListObjects.osStringThe mobile device's operating system.
GSuite.MobileDevices.MobileListObjects.typeStringThe type of mobile device.
GSuite.MobileDevices.MobileListObjects.statusStringThe device's status.
GSuite.MobileDevices.MobileListObjects.hardwareIdStringThe IMEI/MEID unique identifier for Android hardware.
GSuite.MobileDevices.MobileListObjects.firstSyncDateThe date and time the device was initially synchronized with the policy settings in the Admin console.
GSuite.MobileDevices.MobileListObjects.lastSyncDateThe date and time the device was last synchronized with the policy settings in the Admin console.
GSuite.MobileDevices.MobileListObjects.userAgentStringGives information about the device such as os version.
GSuite.MobileDevices.MobileListObjects.serialNumberStringThe device's serial number.
GSuite.MobileDevices.MobileListObjects.imeiStringThe device's IMEI number.
GSuite.MobileDevices.MobileListObjects.meidStringThe device's MEID number.
GSuite.MobileDevices.MobileListObjects.wifiMacAddressStringThe device's MAC address on Wi-Fi networks.
GSuite.MobileDevices.MobileListObjects.networkOperatorStringMobile Device mobile or network operator.
GSuite.MobileDevices.MobileListObjects.defaultLanguageStringThe default locale used on the device.
GSuite.MobileDevices.MobileListObjects.managedAccountIsOnOwnerProfileBooleanBoolean indicating if this account is on owner/primary profile or not.
GSuite.MobileDevices.MobileListObjects.deviceCompromisedStatusStringThe compromised device status.
GSuite.MobileDevices.MobileListObjects.buildNumberStringThe device's operating system build number.
GSuite.MobileDevices.MobileListObjects.kernelVersionStringThe device's kernel version.
GSuite.MobileDevices.MobileListObjects.basebandVersionStringThe device's baseband version.
GSuite.MobileDevices.MobileListObjects.unknownSourcesStatusBooleanUnknown sources enabled or disabled on device
GSuite.MobileDevices.MobileListObjects.adbStatusBooleanAdb (USB debugging) enabled or disabled on device.
GSuite.MobileDevices.MobileListObjects.developerOptionsStatusBooleanDeveloper options enabled or disabled on device.
GSuite.MobileDevices.MobileListObjects.otherAccountsInfoObjectA list of accounts added on device.
GSuite.MobileDevices.MobileListObjects.supportsWorkProfileBooleanWork profile supported on device.
GSuite.MobileDevices.MobileListObjects.manufacturerStringMobile Device manufacturer.
GSuite.MobileDevices.MobileListObjects.releaseVersionStringMobile Device release version version.
GSuite.MobileDevices.MobileListObjects.securityPatchLevelDateMobile Device Security patch level.
GSuite.MobileDevices.MobileListObjects.brandStringMobile Device Brand.
GSuite.MobileDevices.MobileListObjects.bootloaderVersionStringMobile Device Bootloader version.
GSuite.MobileDevices.MobileListObjects.hardwareStringMobile Device Hardware.
GSuite.MobileDevices.MobileListObjects.encryptionStatusStringMobile Device Encryption Status.
GSuite.MobileDevices.MobileListObjects.devicePasswordStatusStringDevice Password Status
GSuite.MobileDevices.MobileListObjects.privilegeStringDM Agent Permission.
GSuite.MobileDevices.MobileListObjects.applications.packageNameStringThe application's package name.
GSuite.MobileDevices.MobileListObjects.applications.displayNameStringThe application's display name.
GSuite.MobileDevices.MobileListObjects.applications.versionNameStringThe application's version name.
GSuite.MobileDevices.MobileListObjects.applications.versionCodeStringThe application's version code.
GSuite.MobileDevices.MobileListObjects.applications.permissionObjectThe list of permissions of this application.

Command example#

!gsuite-mobiledevice-list customer_id=my_customer limit=2 admin_email=adminemail@domain.com

Context Example#

{
"GSuite": {
"MobileDevices": {
"MobileListObjects": [
{
"adbStatus": false,
"basebandVersion": "example_baseband_version",
"bootloaderVersion": "G960FXXU2BRJ3",
"brand": "samsung",
"buildNumber": "example_build_number",
"defaultLanguage": "English",
"developerOptionsStatus": false,
"deviceCompromisedStatus": "No compromise detected",
"deviceId": "example_device_id",
"devicePasswordStatus": "On",
"email": [
"example@example.com",
"example@example.com"
],
"encryptionStatus": "Encrypted",
"etag": "example_etag",
"firstSync": "2019-06-05T20:39:47.195Z",
"hardware": "samsungexynos9810",
"hardwareId": "357164099163035",
"imei": "357164099163035",
"kernelVersion": "4.9.59-14479316-QB20051937",
"kind": "admin#directory#mobiledevice",
"lastSync": "2019-06-06T04:53:44.556Z",
"managedAccountIsOnOwnerProfile": true,
"manufacturer": "samsung",
"meid": "",
"model": "SM-G960F",
"name": [
"example_name"
],
"networkOperator": "",
"os": "Android 8.0.0",
"privilege": "Device administrator",
"releaseVersion": "8.0.0",
"resourceId": "example_resource_id",
"securityPatchLevel": "1538377200000",
"serialNumber": "example_serial_number",
"status": "APPROVED",
"supportsWorkProfile": true,
"type": "ANDROID",
"unknownSourcesStatus": true,
"userAgent": "Google Apps Device Policy 12.14.01",
"wifiMacAddress": ""
},
{
"adbStatus": false,
"basebandVersion": "example_baseband_version",
"bootloaderVersion": "",
"brand": "",
"buildNumber": "",
"defaultLanguage": "",
"developerOptionsStatus": false,
"deviceCompromisedStatus": "Undetected",
"deviceId": "example_device_id",
"devicePasswordStatus": "On",
"email": [
"example@example.com",
"example@example.com"
],
"encryptionStatus": "",
"etag": "example_etag",
"firstSync": "2018-11-17T16:43:09.118Z",
"hardware": "",
"hardwareId": "",
"imei": "",
"kernelVersion": "",
"kind": "admin#directory#mobiledevice",
"lastSync": "2018-11-18T13:58:09.109Z",
"managedAccountIsOnOwnerProfile": false,
"manufacturer": "",
"meid": "",
"model": "iPhone 11 Pro",
"name": [
"example_name"
],
"networkOperator": "",
"os": "iOS 15.4.1",
"privilege": "Undetected",
"releaseVersion": "",
"resourceId": "example_resource_id",
"securityPatchLevel": "0",
"serialNumber": "example_serial_number",
"status": "APPROVED",
"supportsWorkProfile": false,
"type": "IOS_SYNC",
"unknownSourcesStatus": false,
"userAgent": "",
"wifiMacAddress": ""
}
]
}
}
}

Human Readable Output#

Google Workspace Admin - Mobile Devices List#

2 results found |Model Name|OS|Resource Id|Serial Number|Status|Type|User Names| |---|---|---|---|---|---|---| | SM-G960F | Android 8.0.0" | example_resource_id | example_serial_number | APPROVED | ANDROID | example_name | | iPhone10,6 | iOS 15.4.1 | example_resource_id | example_serial_number | APPROVED | IOS_SYNC | example_name |

gsuite-chromeosdevice-list#


Retrieves a paginated list of company-owned ChromeOS devices.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly

Base Command#

gsuite-chromeosdevice-list

Input#

Argument NameDescriptionRequired
customer_idThe unique ID of the customer's Google Workspace Admin account.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
projectionWhether to show all metadata fields, or only the basic metadata fields (e.g., deviceId, serialNumber, status, and user). Possible values are: BASIC, FULL.Optional
querySearch string in the format given at https://developers.google.com/admin-sdk/directory/v1/list-query-operators.Optional
order_byDevice property to use for sorting results. Possible values are: ANNOTATED_LOCATION, ANNOTATED_USER, LAST_SYNC, NOTES, SERIAL_NUMBER, STATUS.Optional
sort_orderWhether to return results in ascending or descending order. Must be used with the order_by parameter. Possible values are: ASCENDING, DESCENDING.Optional
org_unit_pathThe full path of the organizational unit (without the leading /) or its unique ID.Optional
include_child_org_unitsWhether to return devices from all child organizational units. If this is set to true, 'org_unit_path' must be provided. Possible values are: yes, no.Optional
limitThe maximum number of records to return from the collection. The default value is 50.Optional
pageThe page number.Optional
page_sizeThe number of requested results per page. The default value is 50. Max allowed value is 100.Optional

Context Output#

PathTypeDescription
GSuite.ChromeOSDevices.PageToken.NextPageTokenStringThe token of the next page.
GSuite.ChromeOSDevices.ChromeOSListObjectsListA list of Chrome OS Device objects.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceIdStringThe unique ID of the Chrome device.
GSuite.ChromeOSDevices.ChromeOSListObjects.serialNumberStringThe Chrome device serial number entered when the device was enabled.
GSuite.ChromeOSDevices.ChromeOSListObjects.statusStringStatus of the device.
GSuite.ChromeOSDevices.ChromeOSListObjects.lastSyncStringThe date and time the device was last synchronized with the policy settings in the Admin console.
GSuite.ChromeOSDevices.ChromeOSListObjects.supportEndDateStringThe final date the device will be supported.
GSuite.ChromeOSDevices.ChromeOSListObjects.annotatedUserStringThe user of the device as noted by the administrator.
GSuite.ChromeOSDevices.ChromeOSListObjects.annotatedLocationStringThe address or location of the device as noted by the administrator.
GSuite.ChromeOSDevices.ChromeOSListObjects.notesStringNotes about this device added by the administrator.
GSuite.ChromeOSDevices.ChromeOSListObjects.modelStringThe device's model information.
GSuite.ChromeOSDevices.ChromeOSListObjects.meidStringThe Mobile Equipment Identifier (MEID) or the International Mobile Equipment Identity (IMEI) for the 3G mobile card in a ChromeOS device.
GSuite.ChromeOSDevices.ChromeOSListObjects.orderNumberStringThe device's order number.
GSuite.ChromeOSDevices.ChromeOSListObjects.willAutoRenewBooleanDetermines if the device will auto renew its support after the support end date.
GSuite.ChromeOSDevices.ChromeOSListObjects.osVersionStringThe Chrome device's operating system version.
GSuite.ChromeOSDevices.ChromeOSListObjects.platformVersionStringThe Chrome device's platform version.
GSuite.ChromeOSDevices.ChromeOSListObjects.firmwareVersionStringThe Chrome device's firmware version.
GSuite.ChromeOSDevices.ChromeOSListObjects.macAddressStringThe device's wireless MAC address.
GSuite.ChromeOSDevices.ChromeOSListObjects.bootModeStringThe boot mode for the device.
GSuite.ChromeOSDevices.ChromeOSListObjects.lastEnrollmentTimeStringThe date and time the device was last enrolled.
GSuite.ChromeOSDevices.ChromeOSListObjects.kindStringThe type of resource.
GSuite.ChromeOSDevices.ChromeOSListObjects.recentUsersListA list of recent device users, in descending order, by last login time.
GSuite.ChromeOSDevices.ChromeOSListObjects.recentUsers.typeStringThe type of the user.
GSuite.ChromeOSDevices.ChromeOSListObjects.recentUsers.emailStringThe user's email address.
GSuite.ChromeOSDevices.ChromeOSListObjects.activeTimeRangesListA list of active time ranges.
GSuite.ChromeOSDevices.ChromeOSListObjects.activeTimeRanges.activeTimeIntegerDuration of usage in milliseconds.
GSuite.ChromeOSDevices.ChromeOSListObjects.activeTimeRanges.dateIntegerDate of usage.
GSuite.ChromeOSDevices.ChromeOSListObjects.ethernetMacAddressStringThe device's MAC address on the ethernet network interface.
GSuite.ChromeOSDevices.ChromeOSListObjects.annotatedAssetIdStringThe asset identifier as noted by an administrator or specified during enrollment.
GSuite.ChromeOSDevices.ChromeOSListObjects.etagStringETag of the resource.
GSuite.ChromeOSDevices.ChromeOSListObjects.diskVolumeReportsListReports of disk space and other info about mounted/connected volumes.
GSuite.ChromeOSDevices.ChromeOSListObjects.diskVolumeReports.volumeInfoListDisk volumes.
GSuite.ChromeOSDevices.ChromeOSListObjects.diskVolumeReports.volumeInfo.volumeIdStringVolume id.
GSuite.ChromeOSDevices.ChromeOSListObjects.diskVolumeReports.volumeInfo.storageTotalStringTotal disk space [in bytes].
GSuite.ChromeOSDevices.ChromeOSListObjects.diskVolumeReports.volumeInfo.storageFreeStringFree disk space [in bytes].
GSuite.ChromeOSDevices.ChromeOSListObjects.systemRamTotalStringTotal RAM on the device in bytes.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReportsListReports of CPU utilization and temperature.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReports.reportTimeStringDate and time the report was received.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReports.cpuUtilizationPercentageInfoListThe CPU utilization percentage.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReports.cpuTemperatureInfoListA list of CPU temperature samples.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReports.cpuTemperatureInfo.temperatureIntegerTemperature in Celsius degrees.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuStatusReports.cpuTemperatureInfo.labelStringCPU label.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfoListInformation regarding CPU specs in the device.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.modelStringThe CPU model name.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.architectureStringThe CPU architecture.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.maxClockSpeedKhzIntegerThe max CPU clock speed in kHz.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpusListInformation for the Logical CPUs.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.maxScalingFrequencyKhzIntegerMaximum frequency the CPU is allowed to run at, by policy.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.currentScalingFrequencyKhzIntegerCurrent frequency the CPU is running at.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.idleDurationStringIdle time since last boot.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.cStatesListC-States indicate the power consumption state of the CPU. For more information look at documentation published by the CPU maker.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.cStates.displayNameStringName of the state.
GSuite.ChromeOSDevices.ChromeOSListObjects.cpuInfo.logicalCpus.cStates.sessionDurationStringTime spent in the state since the last reboot.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFilesListA list of device files to download.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFiles.nameStringFile name.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFiles.typeStringFile type.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFiles.downloadUrlStringFile download URL.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFiles.createTimeStringDate and time the file was created.
GSuite.ChromeOSDevices.ChromeOSListObjects.deviceFiles.createTimeStringDate and time the file was created.
GSuite.ChromeOSDevices.ChromeOSListObjects.systemRamFreeReportsListReports of amounts of available RAM memory.
GSuite.ChromeOSDevices.ChromeOSListObjects.systemRamFreeReports.reportTimeStringDate and time the report was received.
GSuite.ChromeOSDevices.ChromeOSListObjects.systemRamFreeReports.systemRamFreeInfoListReport of free RAM memory.
GSuite.ChromeOSDevices.ChromeOSListObjects.lastKnownNetworkListContains last known network.
GSuite.ChromeOSDevices.ChromeOSListObjects.lastKnownNetwork.ipAddressStringThe IP address.
GSuite.ChromeOSDevices.ChromeOSListObjects.lastKnownNetwork.wanIpAddressStringThe WAN IP address.
GSuite.ChromeOSDevices.ChromeOSListObjects.autoUpdateExpirationStringThe timestamp after which the device will stop receiving Chrome updates or support.
GSuite.ChromeOSDevices.ChromeOSListObjects.ethernetMacAddress0StringMAC address used by the Chromebook's internal ethernet port, and for onboard network (ethernet) interface. The format is twelve (12) hexadecimal digits without any delimiter (uppercase letters). This is only relevant for some devices.
GSuite.ChromeOSDevices.ChromeOSListObjects.dockMacAddressStringBuilt-in MAC address for the docking station that the device connected to. Factory sets Media access control address (MAC address) assigned for use by a dock. It is reserved specifically for MAC pass through device policy. The format is twelve (12) hexadecimal digits without any delimiter (uppercase letters). This is only relevant for some devices.
GSuite.ChromeOSDevices.ChromeOSListObjects.manufactureDateStringThe date the device was manufactured in yyyy-mm-dd format.
GSuite.ChromeOSDevices.ChromeOSListObjects.orgUnitPathStringThe full parent path with the organizational unit's name associated with the device. Path names are case insensitive. If the parent organizational unit is the top-level organization, it is represented as a forward slash, /.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfoObjectTrusted Platform Module (TPM).
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.familyStringTPM family, using the TPM 2.0 style encoding.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.specLevelStringTPM specification level.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.manufacturerStringTPM manufacturer code.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.tpmModelStringTPM model number.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.firmwareVersionStringTPM firmware version.
GSuite.ChromeOSDevices.ChromeOSListObjects.tpmVersionInfo.vendorSpecificStringVendor-specific information such as Vendor ID.
GSuite.ChromeOSDevices.ChromeOSListObjects.screenshotFilesListA list of screenshot files to download.
GSuite.ChromeOSDevices.ChromeOSListObjects.screenshotFiles.nameStringFile name.
GSuite.ChromeOSDevices.ChromeOSListObjects.screenshotFiles.typeStringFile type.
GSuite.ChromeOSDevices.ChromeOSListObjects.screenshotFiles.downloadUrlStringFile download URL.
GSuite.ChromeOSDevices.ChromeOSListObjects.screenshotFiles.createTimeStringDate and time the file was created.
GSuite.ChromeOSDevices.ChromeOSListObjects.orgUnitIdStringThe unique ID of the organizational unit. orgUnitPath is the human readable version of orgUnitId. While orgUnitPath may change by renaming an organizational unit within the path, orgUnitId is unchangeable for one organizational unit.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatusObjectThe status of the OS updates for the device.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.stateStringThe update state of an OS update.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.targetOsVersionStringNew platform version of the OS image being downloaded and applied.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.targetKioskAppVersionStringNew required platform version from the pending updated kiosk app.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.updateTimeStringDate and time of the last successful OS update.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.updateCheckTimeStringDate and time of the last update check.
GSuite.ChromeOSDevices.ChromeOSListObjects.osUpdateStatus.rebootTimeStringDate and time of the last reboot.
GSuite.ChromeOSDevices.ChromeOSListObjects.firstEnrollmentTimeStringDate and time for the first time the device was enrolled.

Command example#

!gsuite-chromeosdevice-list customer_id=my_customer limit=2 admin_email=adminemail@domain.com

gsuite-chromeosdevice-action#


Executes an action that affects a ChromeOS Device. This includes de-provisioning, disabling, and re-enabling devices.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.chromeos

Base Command#

gsuite-chromeosdevice-action

Input#

Argument NameDescriptionRequired
customer_idThe unique ID of the customer's Google Workspace Admin account.Optional
admin_emailEmail ID of the G Suite domain admin acts on behalf of an end-user.Optional
resource_idThe unique ID of the device.Required
actionThe action to be performed on the ChromeOS device. Possible values are: deprovision, disable, reenable, pre_provisioned_disable, pre_provisioned_reenable.Required
deprovision_reasonReason for deprovision. This field is required only when the action used is deprovision. Possible values are: different_model_replacement, retiring_device, same_model_replacement, upgrade_transfer.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-chromeosdevice-action resource_id=RESOURCE_ID action=admin_account_wipe customer_id=my_customer admin_email=admin@domain.io

Human Readable Output#

ChromeOS device with resource id - RESOURCE_ID updated.

gsuite-user-reset-password#


Retreive a group's details given a group key.

Required Permissions#

https://www.googleapis.com/auth/admin.directory.user

Base Command#

gsuite-user-reset-password

Input#

Argument NameDescriptionRequired
user_keyOne of the following: user email address, alias email address, or the unique user ID.Required

Context Output#

PathTypeDescription
GSuite.User.idStringThe unique ID for the user.
GSuite.User.primaryEmailStringThe user's primary email address.
GSuite.User.firstNameStringThe user's first name.
GSuite.User.lastNameStringThe user's last name.
GSuite.User.customerIdStringThe unique ID for the customer's G Suite account.
GSuite.User.genderStringThe user's gender.
GSuite.User.suspendedBooleanIndicates if the user is suspended.
GSuite.User.notesValueStringContent of the notes.
GSuite.User.notesContentTypeStringContent type of the notes.
GSuite.User.isAdminBooleanIndicates a user with super administrator privileges.
GSuite.User.creationTimeDateThe time the user's account was created.
GSuite.User.phones.valueStringA human-readable phone number. It may be in any telephone number format.
GSuite.User.phones.typeStringThe type of phone number.
GSuite.User.phones.primaryBooleanIndicates if this is the user's primary phone number.
GSuite.User.phones.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.addresses.typeStringThe address type.
GSuite.User.addresses.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.addresses.sourceIsStructuredBooleanIndicates if the user-supplied address was formatted. Formatted addresses are not currently supported.
GSuite.User.addresses.formattedStringA full and unstructured postal address. This is not synced with the structured address fields.
GSuite.User.addresses.poBoxStringThe post office box, if present.
GSuite.User.addresses.localityStringThe town or city of the address.
GSuite.User.addresses.countryCodeStringThe country code. Uses the ISO 3166-1 standard.
GSuite.User.addresses.countryStringCountry.
GSuite.User.addresses.postalCodeStringThe ZIP or postal code.
GSuite.User.addresses.regionStringThe abbreviated province or state.
GSuite.User.addresses.streetAddressStringThe street address.
GSuite.User.addresses.extendedAddressStringFor extended addresses, such as an address that includes a sub-region.
GSuite.User.addresses.primaryBooleanIf this is the user's primary address.
GSuite.User.emails.addressStringThe user's secondary email.
GSuite.User.emails.typeStringThe secondary email type.
GSuite.User.emails.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.emails.primaryBooleanIndicates if this is the user's primary email. Only one entry can be marked as primary.
GSuite.User.ipWhitelistedBooleanIf true, the user's IP address is added to allow the list.
GSuite.User.recoveryEmailStringRecovery email of the user.
GSuite.User.isDelegatedAdminBooleanIndicates if the user is a delegated administrator.
GSuite.User.recoveryPhoneStringRecovery phone of the user.
GSuite.User.orgUnitPathStringThe 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 (/).
GSuite.User.isMailboxSetupBooleanIndicates if the user's Google mailbox is created.
GSuite.User.kindBooleanThe type of the API resource.
GSuite.User.etagBooleanETag of the resource.
GSuite.User.hashFunctionStringStores the hash format of the password property.
GSuite.User.archivedBooleanIndicates if the user is archived.
GSuite.User.fullNameStringThe user's full name formed by concatenating the first and last name values.
GSuite.User.lastLoginTimeDateThe last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
GSuite.User.deletionTimeDateThe time the user's account was deleted. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
GSuite.User.agreedToTermsBooleanThis property is true if the user has completed an initial login and accepted the Terms of Service agreement.
GSuite.User.suspensionReasonStringThe 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.
GSuite.User.changePasswordAtNextLoginBooleanIndicates 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.
GSuite.User.ims.typeBooleanType of the user's Instant Messenger (IM) account.
GSuite.User.ims.customTypeStringIf the IM type is custom, this property holds the custom type string.
GSuite.User.ims.protocolStringAn IM protocol identifies the IM network. The value can be a custom network or the standard network.
GSuite.User.ims.customProtocolStringIf the protocol value is custom_protocol, this property holds the custom protocol's string.
GSuite.User.ims.imStringThe user's IM network ID.
GSuite.User.ims.primaryBooleanIf this is the user's primary IM. Only one entry in the IM list can have a value of true.
GSuite.User.externalIds.valueStringThe value of the external ID.
GSuite.User.externalIds.typeStringThe type of the external ID.
GSuite.User.externalIds.customTypeStringIf the external ID type is custom, this property holds the custom type.
GSuite.User.relations.valueStringThe name of the person the user is related to.
GSuite.User.relations.typeStringThe type of relationship.
GSuite.User.relations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.nameStringThe name of the organization.
GSuite.User.organizations.titleStringThe user's title within the organization, for example 'member' or 'engineer'.
GSuite.User.organizations.primaryBooleanIndicates if this is the user's primary organization. A user may only have one primary organization.
GSuite.User.organizations.typeStringThe type of organization.
GSuite.User.organizations.customTypeStringIf the value of type is custom, this property contains the custom type.
GSuite.User.organizations.departmentStringSpecifies the department within the organization, such as 'sales' or 'engineering'.
GSuite.User.organizations.symbolStringText string symbol of the organization. For example, the text symbol for Google is GOOG.
GSuite.User.organizations.locationStringThe physical location of the organization. This does not need to be a fully qualified address.
GSuite.User.organizations.descriptionStringThe description of the organization.
GSuite.User.organizations.domainStringThe domain the organization belongs to.
GSuite.User.organizations.costCenterStringThe cost center of the user's organization.
GSuite.User.organizations.fullTimeEquivalentStringThe full-time equivalent millipercent within the organization (100000 = 100%).
GSuite.User.languages.languageCodeStringLanguage Code. Should be used for storing Google III LanguageCode string representation for language. Illegal values cause SchemaException.
GSuite.User.languages.customLanguageStringOther language. A user can provide their own language name if there is no corresponding Google III language code. If this is set, LanguageCode can't be set.
GSuite.User.posixAccounts.usernameStringThe username of the account.
GSuite.User.posixAccounts.uidNumberThe POSIX compliant user ID.
GSuite.User.posixAccounts.gidNumberThe default group ID.
GSuite.User.posixAccounts.homeDirectoryStringThe path to the home directory for this account.
GSuite.User.posixAccounts.shellStringThe path to the login shell for this account.
GSuite.User.posixAccounts.gecosStringThe GECOS (user information) for this account.
GSuite.User.posixAccounts.systemIdStringSystem identifier for which account Username or UID applies to.
GSuite.User.posixAccounts.primaryBooleanIf this is the user's primary account within the SystemId.
GSuite.User.posixAccounts.accountIdStringA POSIX account field identifier.
GSuite.User.posixAccounts.operatingSystemTypeStringThe operating system type for this account.
GSuite.User.sshPublicKeys.keyStringAn SSH public key.
GSuite.User.sshPublicKeys.expirationTimeUsecStringAn expiration time in microseconds since epoch.
GSuite.User.sshPublicKeys.fingerprintStringA SHA-256 fingerprint of the SSH public key.
GSuite.User.aliasesUnknownList of the user's alias email addresses.
GSuite.User.nonEditableAliasesUnknownList of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
GSuite.User.websites.valueStringThe URL of the website.
GSuite.User.websites.primaryBooleanIf this is the user's primary website or not.
GSuite.User.websites.typeStringThe type or purpose of the website. For example, a website could be labeled as home or blog. Alternatively, an entry can have a custom type.
GSuite.User.websites.customTypeStringThe custom type. Only used if the type is custom.
GSuite.User.locations.typeStringThe location type.
GSuite.User.locations.customTypeStringIf the location type is custom, this property contains the custom value.
GSuite.User.locations.areaStringTextual location. This is most useful for display purposes to concisely describe the location. For example, "Mountain View, CA", "Near Seattle".
GSuite.User.locations.buildingIdStringBuilding identifier.
GSuite.User.locations.floorNameStringFloor name/number.
GSuite.User.locations.floorSectionStringFloor section. More specific location within the floor. For example, if a floor is divided into sections "A", "B", and "C", this field would identify one of those values.
GSuite.User.locations.deskCodeStringMost specific textual code of individual desk location.
GSuite.User.keywords.typeStringEach entry can have a type which indicates the standard type of that entry. For example, keyword could be of type occupation or outlook. In addition to the standard type, an entry can have a custom type and can give it any name. Such types should have the CUSTOM value as type and also have a customType value.
GSuite.User.keywords.customTypeStringCustom Type.
GSuite.User.keywords.valueStringKeyword.
GSuite.User.isEnrolledIn2SvBooleanIs enrolled in 2-step verification.
GSuite.User.isEnforcedIn2SvBooleanIs 2-step verification enforced.
GSuite.User.includeInGlobalAddressListBooleanIndicates if the user's profile is visible in the G Suite global address list when the contact sharing feature is enabled for the domain.
GSuite.User.thumbnailPhotoUrlStringPhoto URL of the user.
GSuite.User.thumbnailPhotoEtagStringETag of the user's photo.
GSuite.User.customSchemasUnknownCustom fields of the user.

Command Example#

gsuite-user-reset-password user_key=nikolic@demistodev.com

Context Example#

{
"GSuite": {
"User": {
"firstName": "Nemanja",
"fullName": "Nemanja Nikolic",
"lastName": "Nikolic",
"kind": "admin#directory#user",
"id": "104065793340555884068",
"etag": "BvGfkzKoKVD0NM7VdXdzkXDD-nHLkyMjheL_9Z5X0H0/oMJEIb2O8LE-zfPM0TV_9m3WkMA",
"primaryEmail":
"nikolic@demistodev.com",
"isAdmin": "False",
"isDelegatedAdmin": "False",
"lastLoginTime": "1970-01-01T00:00:00.000Z",
"creationTime": "2024-02-11T13:44:14.000Z",
"agreedToTerms": "False",
"suspended": "False",
"archived": "False",
"changePasswordAtNextLogin": "true",
"ipWhitelisted": "False",
"emails": [
{
"address": "nikolic@demistodev.com",
"primary": "True"
},
{
"address": "nikolic@demistodev.com.test-google-a.com"
}
],
"nonEditableAliases": ["nikolic@demistodev.com.test-google-a.com"],
"customerId": "C02f0zfqw",
"orgUnitPath": "/",
"isMailboxSetup": "True",
"includeInGlobalAddressList": "True",
"thumbnailPhotoUrl": "//lh3.googleusercontent.com/a/ACg8ocJ85an5w7nMMFnC78mUqjuy2jhUHv2cSn7_-DeK0X93=mo",
"thumbnailPhotoEtag": "BvGfkzKoKVD0NM7VdXdzkXDD-nHLkyMjheL_9Z5X0H0/iIfdCQy7n1Lau3YZCJL6xXPk3WE"
}
}
}

Human Readable Output#

Updated User Details#

IdCustomer IdPrimary EmailChange Password At Next Login
104065793340555884068C02f0zfqwnikolic@demistodev.comtrue

gsuite-chromebrowserdevice-move-ou#


To move Chrome browser devices assigned to an account from one organization unit to another, use the following POST request and include the access token obtained by following the "Authorization" section.

Base Command#

gsuite-chromebrowserdevice-move-ou

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.chromebrowsers

Input#

Argument NameDescriptionRequired
customer_idThe unique identifier of the customer's Google account.Optional
resource_idsA comma-separated list of unique device IDs of Chrome browser devices to move. A maximum of 600 browsers may be moved per request.Required
org_unit_pathDestination organization unit to move devices to. Full path of the organizational unit or its ID prefixed with 'id:'.Required

Context Output#

There is no context output for this command.

Command Example#

!gsuite-chromebrowserdevice-move-ou customer_id="test" resource_ids="11111" org_unit_path="/testing"

Human Readable Output#

Chrome browser devices have been moved to the new organization unit ORGANIZATIONAL_UNIT_PATH.

gsuite-chromebrowserdevice-list#


Retrieve all Chrome browser devices for an account or a specific Chrome browser device.

Base Command#

gsuite-chromebrowserdevice-list

Required Permissions#

https://www.googleapis.com/auth/admin.directory.device.chromebrowsers

Input#

Argument NameDescriptionRequired
customer_idThe unique identifier of the customer's Google account.Optional
device_idThe unique ID of the device.Optional
order_byField by which to order. Possible values are: id, last_sync, machine_name, extension_count, policy_count, os_version, last_signed_in_user, annotated_user, annotated_location, annotated_asset_id, notes, browser_version_channel, org_unit, enrollment_date, save_browsing_clickthrough, platform_major_version, last_activity, browser_version_sortable, os_version_sortable.Optional
org_unit_pathThe full path of the organizational unit or its unique ID.Optional
projectionRestrict information returned to a set of selected fields. "BASIC" - Includes only the basic metadata fields (i.e., the ones found in the columns of the admin console browser list as enumerated above). "FULL" - Includes all metadata fields (as enumerated above). Possible values are: BASIC, FULL.Optional
querySearch string using the list page query language (Filter Query Language)Optional
sort_orderWhether to return results in ascending or descending order. Must be used with the orderBy parameter. Possible values are: ASCENDING, DESCENDING.Optional
page_sizeThe maximum number of policy schemas to return. Default and maximum are 100.Optional
page_tokenPage token.Optional
limitLimit of number of devices.Optional

Context Output#

PathTypeDescription
GSuite.ChromeBrowserDevices.nextPageTokenStringThe token of the next page.
GSuite.ChromeBrowserDevices.browserObjects.deviceIdStringThe unique Device ID for the device.
GSuite.ChromeBrowserDevices.browserObjects.kindStringThe type of device.
GSuite.ChromeBrowserDevices.browserObjects.osPlatformStringDevice operating system platform.
GSuite.ChromeBrowserDevices.browserObjects.osVersionStringDevice operating system version.
GSuite.ChromeBrowserDevices.browserObjects.machineNameStringDevice machine name.
GSuite.ChromeBrowserDevices.browserObjects.lastRegistrationTimeStringDevice last registration time.
GSuite.ChromeBrowserDevices.browserObjects.lastActivityTimeStringDevice last activity time.
GSuite.ChromeBrowserDevices.browserObjects.osPlatformVersionStringDevice operating system platform version.
GSuite.ChromeBrowserDevices.browserObjects.serialNumberStringDevice serial number.
GSuite.ChromeBrowserDevices.browserObjects.virtualDeviceIdStringDevice virtual ID.
GSuite.ChromeBrowserDevices.browserObjects.orgUnitPathStringDevice organizational unit path.
GSuite.ChromeBrowserDevices.browserObjects.deviceIdentifiersHistoryStringDevice identifier history.

Command Example#

!gsuite-chromebrowserdevice-list customer_id=test

Context Example#

{
"GSuite": {
"ChromeBrowserDevices": [
{
"deviceId": "test",
"kind": "admin#directory#browserdevice",
"osPlatform": "Windows",
"osVersion": "10.0.19045.4046",
"machineName": "WIN10-test",
"lastRegistrationTime": "2024-02-20T21:16:00.902Z",
"lastActivityTime": "2024-02-20T21:16:00.902Z",
"osPlatformVersion": "Windows 10",
"serialNumber": "test 00 00 00",
"virtualDeviceId": "11111-aca1116-1111-1111-6823faec8350",
"orgUnitPath": "/testing",
"deviceIdentifiersHistory": {}
}
]
}
}

Human Readable Output#

Chrome Browser Device List#

Device IdOs PlatformOs VersionMachine NameSerial NumberOrg Unit Path
testWindows10.0.19045.4046WIN10-testtest 00 00 00/testing

gsuite-policy-modify#


Modifies multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and must have the same keys specified in additionalTargetKeyNames, though the values for those keys may be different. On failure the request will return the error details as part of the google.rpc.Status.

Base Command#

gsuite-policy-modify

Required Permissions#

https://www.googleapis.com/auth/chrome.management.policy

Input#

Argument NameDescriptionRequired
customer_idID of the Google Workspace account or literal 'my_customer' for the customer associated with the request.Optional
target_typeIn case of Group use “POST…groups:batchModify”. In case of OrgUnit use “POST…orgunits:batchModify”. Possible values are: Group, OrgUnit.Required
policy_raw_jsonString as JSON representation of the ModifyGroupPolicyRequest
{
"requests": [
{
"policyTargetKey": {
"targetResource": "orgunits/03ph8a2z1kjba6k",
"additionalTargetKeys": {
"app_id": "chrome:jldhpllghnbhlbpcmnajkpdmadaolakh"
}
},
"policyValue": {
"policySchema": "chrome.users.apps.InstallType",
"value": {
"appInstallType": "BLOCKED"
}
},
"updateMask": "appInstallType"
}
]
}.
Optional
policy_field_json_entry_idEntry ID of the file that contains JSON representation of the ModifyGroupPolicyRequest.Optional
target_resourceThe target resource on which this policy is applied. The following resources are supported:

Organizational Unit ("orgunits/{orgunit_id}")
Group ("groups/{groupId}").
Optional
additional_target_keysMap containing the additional target key name and value pairs used to further identify the target of the policy.

A string containing a list of "key": "value" pairs. Example: ""name": "wrench", "mass": "1.3kg", "count": "3"".
Optional
policy_schemaThe fully qualified name of the policy schema that is being inherited.Optional
policy_valueThe value of the policy that is compatible with the schema that it is associated with Struct format.Optional
update_maskPolicy fields to update. Only fields in this mask will be updated; other fields in policyValue will be ignored (even if they have values). If a field is in this list it must have a value in 'policyValue'.
This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".
Field mask format.
Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-policy-modify customer_id=test target_type=Group target_resource=1111111111 policy_schema_filter=chrome.users.apps.InstallType additional_target_keys="\"app_id\":\"chrome:1111111aaaaaaaaa\"" policy_schema=chrome.users.apps.InstallType policy_value=BLOCKED update_mask=appInstallType

Human Readable Output#

Policy has been modified for the customer CUSTOMER_ID.

gsuite-policy-schemas-list#


Gets a list of policy schemas that match a specified filter value for a given customer.

Base Command#

gsuite-policy-schemas-list

Required Permissions#

https://www.googleapis.com/auth/chrome.management.policy

Input#

Argument NameDescriptionRequired
customer_idID of the Google Workspace account or literal "my_customer" for the customer associated with the request.Optional
schema_nameThe policy schema resource name to query. Required when asking for a specific policy.Optional
filterThe schema filter is used to find a particular schema based on fields like its resource name, description and additionalTargetKeyNames.Optional
page_sizeThe maximum number of policy schemas to return. Defaults to 100 and has a maximum of 1000.Optional
page_tokenPage token.Optional
limitLimit of policies returned.Optional

Context Output#

PathTypeDescription
GSuite.PolicySchema.nextPageTokenStringThe token of the next page.
GSuite.PolicySchema.policySchemaObjectsStringPolicy name.
GSuite.PolicySchema.policySchemaObjects.nameStringPolicy name.
GSuite.PolicySchema.policySchemaObjects.policyDescriptionStringPolicy description.
GSuite.PolicySchema.policySchemaObjects.definitionArrayPolicy definition.
GSuite.PolicySchema.policySchemaObjects.definition.enumTypeArrayPolicy definition ENUM type.
GSuite.PolicySchema.policySchemaObjects.definition.messageTypeArrayPolicy definition message type.
GSuite.PolicySchema.policySchemaObjects.fieldDescriptionsArrayPolicy file description.
GSuite.PolicySchema.policySchemaObjects.fieldDescriptions.descriptionStringPolicy file description.
GSuite.PolicySchema.policySchemaObjects.fieldDescriptions.fieldStringPolicy file description field.
GSuite.PolicySchema.policySchemaObjects.fieldDescriptions.fieldConstraintsArrayPolicy file description field constraints.
GSuite.PolicySchema.policySchemaObjects.fieldDescriptions.knownValueDescriptionsListPolicy file description known value description.
GSuite.PolicySchema.policySchemaObjects.noticesListPolicy notice.
GSuite.PolicySchema.policySchemaObjects.notices.acknowledgementRequiredBooleanPolicy notice is acknowledgement required.
GSuite.PolicySchema.policySchemaObjects.notices.fieldStringPolicy notice field.
GSuite.PolicySchema.policySchemaObjects.notices.noticeMessageStringPolicy notice message.
GSuite.PolicySchema.policySchemaObjects.notices.noticeValueStringPolicy notice value.
GSuite.PolicySchema.policySchemaObjects.supportUriStringPolicy support URI.
GSuite.PolicySchema.policySchemaObjects.schemaNameStringPolicy schema name.
GSuite.PolicySchema.policySchemaObjects.validTargetResourcesListPolicy valid target resources.
GSuite.PolicySchema.policySchemaObjects.policyApiLifecycleArrayPolicy API lifecycle.
GSuite.PolicySchema.policySchemaObjects.policyApiLifecycle.policyApiLifecycleStageStringPolicy API lifecycle stage.
GSuite.PolicySchema.policySchemaObjects.categoryTitleStringPolicy category title.
GSuite.PolicySchema.policySchemaObjects.supportedPlatformsStringPolicy supported platforms.

Command Example#

!gsuite-policy-schemas-list customer_id=test limit=2

Context Example#

{
"GSuite": {
"PolicySchema": [
{
"name": "customers/test/policySchemas/chrome.devices.test.appsconfig.AutoLaunchApp",
"policyDescription": "Allows setting of the auto-launch app.",
"definition": {
"messageType": [
{
"name": "AutoLaunchApp",
"field": [
{
"name": "appId",
"number": "1",
"label": "LABEL_OPTIONAL",
"type": "TYPE_STRING"
}
]
}
],
"enumType": [
{
"name": "Rotation",
"value": [
{
"name": "ROTATE_0",
"number": "0"
}
]
}
]
},
"fieldDescriptions": [
{
"field": "appId",
"description": "Id of the app prefixed with one of either \"chrome:\" or \"web:\", depending on the app type. For Chrome apps, the app id can be found on the Chrome Web Store, example: \"chrome:aapbdbdomjkkjkaonfhkkikfgjllcleb\". For Web apps, the app id is simply the URL, example: \"web:https://translate.google.com\".",
"name": "Id of the app prefixed with one of either \"chrome:\" or \"web:\", depending on the app type. For Chrome apps, the app id can be found on the Chrome Web Store, example: \"chrome:aapbdbdomjkkjkaonfhkkikfgjllcleb\". For Web apps, the app id is simply the URL, example: \"web:https://translate.google.com\".",
"fieldConstraints": {}
}
],
"notices": [
{
"field": "enableSystemLogUpload",
"noticeValue": "true",
"noticeMessage": "In order to enable System Log Upload functionality, you must first inform the users of managed kiosk devices that their activity may be monitored and data may be inadvertently captured and shared. Without notification to your users, you are in violation of the terms of your agreement with Google.",
"acknowledgementRequired": "True"
}
],
"schemaName": "chrome.devices.test.appsconfig.AutoLaunchApp",
"validTargetResources": [
"ORG_UNIT"
],
"policyApiLifecycle": {
"policyApiLifecycleStage": "API_CURRENT"
},
"categoryTitle": "Kiosk apps config"
},
{
"name": "customers/test/policySchemas/chrome.users.appsconfig.AndroidAppsEnabled",
"policyDescription": "Android apps on Chrome devices.",
"definition": {
"messageType": [
{
"name": "AndroidAppsEnabled",
"field": [
{
"name": "arcEnabled",
"number": "1",
"label": "LABEL_OPTIONAL",
"type": "TYPE_BOOL"
}
]
}
]
},
"fieldDescriptions": [
{
"field": "arcEnabled",
"description": "Whether to allow or disallow to install Android apps for managed ChromeOS users.",
"knownValueDescriptions": [
{
"value": "true",
"description": "Allow users to install Android apps on ChromeOS devices."
}
],
"defaultValue": "True",
"name": "Whether to allow or disallow to install Android apps for managed ChromeOS users.",
"fieldConstraints": {}
}
],
"notices": [
{
"field": "arcEnabled",
"noticeValue": "true",
"noticeMessage": "Before you set this to true you must accept the Managed Google Play Agreement by going to https://play.google.com/work/termsofservice with a super administrator account."
},
],
"supportUri": "https://support.google.com/chrome/a/answer/9039146?hl=en#androidapps",
"schemaName": "chrome.users.appsconfig.AndroidAppsEnabled",
"validTargetResources": [
"ORG_UNIT"
],
"policyApiLifecycle": {
"policyApiLifecycleStage": "API_CURRENT"
},
"categoryTitle": "Additional app settings",
"supportedPlatforms": [
"CHROME_OS"
]
}
]
}
}

Human Readable Output#

Policy Schemas List#

NamePolicy DescriptionSchema Name
customers/test/policySchemas/chrome.devices.test.appsconfig.AutoLaunchAppAllows setting of the auto-launch app.chrome.devices.test.appsconfig.AutoLaunchApp
customers/test/policySchemas/chrome.users.appsconfig.AndroidAppsEnabledAndroid apps on Chrome devices.chrome.devices.test.appsconfig.AutoLaunchApp

gsuite-policy-resolve#


Gets the resolved policy values for a list of policies that match a search query.

Base Command#

gsuite-policy-resolve

Required Permissions#

https://www.googleapis.com/auth/chrome.management.policy

Input#

Argument NameDescriptionRequired
customer_idID of the Google Workspace account or literal "my_customer" for the customer associated with the request.Optional
policy_schema_filterSpecify a schema name to view a particular schema, for example: chrome.users.ShowLogoutButton. See https://developers.google.com/chrome/policy/guides/policy-schemas for details on schema namespaces.Required
target_typeType of target. Possible values are: Group, OrgUnit.Required
target_resourceThe target resource on which this policy is applied. The following resources are supported: Organizational Unit ("orgunits/{orgunit_id}") or Group ("groups/{groupId}").Required
additional_target_keysMap (key: string, value: string) containing the additional target key name and value pairs used to further identify the target of the policy.Optional
page_sizeThe maximum number of policy schemas to return. Defaults to 100 and has a maximum of 1000.Optional
page_tokenPage token.Optional
limitLimit of policies returned.Optional

Context Output#

PathTypeDescription
GSuite.Policy.nextPageTokenStringThe token of the next page.
GSuite.Policy.policyObject.targetKey.targetResourceStringPolicy target key target resource.
GSuite.Policy.policyObject.targetKey.additionalTargetKeysStringPolicy target key additional target keys.
GSuite.Policy.policyObject.value.policySchemaStringPolicy schema value.
GSuite.Policy.policyObject.value.valueStringPolicy value.
GSuite.Policy.policyObject.sourceKey.targetResourceStringPolicy source key target resource.
GSuite.Policy.policyObject.addedSourceKey.targetResourceStringPolicy added source key target resource.

Command Example#

!gsuite-policy-resolve customer_id=test policy_schema_filter=chrome.users.apps.InstallType target_resource=1111111 target_type=OrgUnit

Context Example#

{
"GSuite": {
"Policy": [
{
"targetKey":
{
"targetResource": "orgunits/1111111",
"additionalTargetKeys":
{
"app_id": "chrome:aaaaaaaaaaaa"
}
},
"value":
{
"policySchema": "chrome.users.apps.InstallType",
"value":
{
"appInstallType": "BLOCKED"
}
},
"sourceKey":
{
"targetResource": "orgunits/1111111"
},
"addedSourceKey":
{
"targetResource": "orgunits/1111111"
}
}
]
}
}

Human Readable Output#

Resolved Policies#

Target ResourceAdditional Target KeysPolicy Schema
orgunits/1111111app_id: chrome:aaaaaaaaaaaachrome.users.apps.InstallType

gsuite-policy-groups-delete#


Delete multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and must have the same keys specified in additionalTargetKeyNames, though the values for those keys may be different. On failure the request will return the error details as part of the google.rpc.Status.

Base Command#

gsuite-policy-groups-delete

Required Permissions#

https://www.googleapis.com/auth/chrome.management.policy

Input#

Argument NameDescriptionRequired
customer_idID of the Google Workspace account or literal "my_customer" for the customer associated with the request.Optional
policy_raw_jsonString as JSON representation of the DeleteGroupPolicyRequest
{
"policyTargetKey": {
object (PolicyTargetKey)
},
"policySchema": string
}.
Optional
policy_field_json_entry_idEntry Id of the file that contains JSON representation of the DeleteGroupPolicyRequest
{
"policyTargetKey": {
object (PolicyTargetKey)
},
"policySchema": string
}.
Required
target_resourceThe target resource on which this policy is applied. The following resources are supported:

Organizational Unit ("orgunits/{orgunit_id}")
Group ("groups/{groupId}").
Optional
additional_target_keysMap containing the additional target key name and value pairs used to further identify the target of the policy.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Optional
policy_schemaThe fully qualified name of the policy schema that is being inherited.Optional

Context Output#

There is no context output for this command.

Command Example#

!gsuite-policy-groups-delete customer_id=test target_type=Group target_resource=1111 policy_schema=chrome.users.apps.InstallType additional_target_keys=""\"app_id\":\"chrome:111111\""

Human Readable Output#

Policy has been deleted for the customer CUSTOMER_ID.