On this page
Snap type: | Transform | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap updates users, groups and org units in Google Directory.
| |||||||
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.
| |||||||
Views: |
| |||||||
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:
Default value: user | |||||||
Action | Required. The type of action to perform. The options available include:
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 | |||||||
Snap execution | Select one of the three modes in which the Snap executes. Available options are: Disabled: Disables the Snap and all Snaps that are downstream from it. |
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.
Note: photoData 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
- For users: https://developers.google.com/admin-sdk/directory/v1/reference/users/update
- For user photo: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users.photos/update
- For groups: https://developers.google.com/admin-sdk/directory/v1/reference/groups/update
- For org units: https://developers.google.com/admin-sdk/directory/v1/reference/orgunits/update
Snap Pack History