On this page

Snap type:

Transform


Description:

This Snap updates users, groups and org units in Google Directory.

  • Expected upstream SnapsFile reader followed by any file parser followed by Structure.
  • Expected downstream SnapsAny file Formatter followed by File Writer.
  • Expected inputResource type and input data.
  • Expected output The data for the resource type provided.


Prerequisites:

[None]


Support and limitations:Works in Ultra Task Pipelines.
Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Google Directory Accounts for information on setting up this type of account.

  • Verify that you have the correct Application scope defined for your account. See Google Directory Application Scope for more information.
  • Access tokens for Google Directory accounts expire in one hour. 


Views:


InputThis Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Resource



Required. The type of resource to be created.

The options available include:

  • user
  • userPhoto
  • orgunit
  • group

Default value: user


Action


Required. The type of action to perform. The options available include:

  • update
  • patch

Use the patch option to send only the data for the specific fields you are updating and minimize the size of the update request. See Google's documentation on Patch (partial update) for more information.

Default value: update



Supported Attributes by Resource

User

  • userKey - Required.
  • See the API documentation referenced at the bottom of the page for the complete list of optional field properties.

    You can write and update custom fields in a user profile. You must define the custom schema on the domain prior to use.


User.Photo

  • userkey - Required.
  • photoData - Required for update.

NotephotoData should be provided as a base64 string.

  • See the API documentation referenced at the bottom of the page for the complete list of optional field properties.

Group

  • groupKey - Required.
  • See the API documentation referenced at the bottom of the page for the complete list of optional field properties.

OrgUnit

  • customerID - Required.
  • orgUnitPath - Required.
  • See the API documentation referenced at the bottom of the page for the complete list of optional field properties.

Examples

JSON to add a User.photo

[
{
  "kind": "admin#directory#user#photo",
  "id": string,
  "etag": etag,
  "primaryEmail": string,
  "mimeType": string,
  "height": integer,
  "width": integer,
  "photoData": bytes
}
]

JSON for Updating a User

In this example, the user Jane Doe is now Jane Smith, so her familyName is being updated. She is also being added to the TestOrg orgunit.

[
    {
        "userKey": "janedoe@example.com",
        "name": {
            "familyName": "Smith",
            "givenName": "Jane"
        },
        "orgUnitPath": "/TestOrg"
    }
]

See Also