On this Pagepage
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Transform | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap updates users, groups and org units in Google Directory.
| |||||||||||||
Prerequisites: | [None] | |||||||||||||
Support and limitations: |
| |||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Google/wiki/spaces/DRWIP/pages/1438788 Directory Account 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 | |||||||||||||
|
|
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.
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
Code Block |
---|
[ { "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.
Code Block |
---|
[ { "userKey": "janedoe@example.com", "name": { "familyName": "Smith", "givenName": "Jane" }, "orgUnitPath": "/TestOrg" } ] |
Related Information
Refer to the following documentation for information on the input data:See Also
- For users: https://developers.google.com/admin-sdk/directory/v1/reference/users/update
- For userphotouser photo: https://developers.google.com/admin-sdk/directory/v1/reference/users/photos/update
- For groups: https://developers.google.com/admin-sdk/directory/v1/reference/groups/update
- For orgunitsorg units: https://developers.google.com/admin-sdk/directory/v1/reference/orgunits/update
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|