Google Directory Read
On this Page
Snap type: | Read | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap reads the data of the users, user photos, groups and org units in Google Directory.
| |||||||
Prerequisites: | [None] | |||||||
Support and limitations: | Works in Ultra Tasks. | |||||||
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 | |||||||
Filter Attributes- | Filter keys - The suggested filter attributes based on the provided Resource Type selected. Examples: See below. Default value: [None] | |||||||
On empty result | Specify or select the Snap behavior when no matching filter value is found. The available options are: Ignore: Select this option if you do not require an output document. Error: Select this option if you want to send an error document to the error view. Output: Select this option if you want an empty output document.
Default value: space Examples: Ignore | |||||||
Snap execution | Select one of the three modes in which the Snap executes. Available options are:
|
Supported Filter Attributes by Resource
User
- userKey - Required for Users Get API. Set the expression toggle (=) off and enter the userKey.
- domain - Optional. Set the expression toggle (=) off and enter the domain.
- showDeleted - Optional. Set the expression toggle (=) off and enter true | false.
- fields - Optional. Set the expression toggle (=) off and list the fields to return, separated by a comma. See the API documentation referenced at the bottom of the page for the complete list of fields.
query - Optional. Set the expression toggle (=) off and enter the query without quotation marks.
Learn more about the user fields that are queryable within the user resource.
- maxResults - Optional. Set the expression toggle (=) off and enter an integer (1 to 500, inclusive).
- customer - Set the expression toggle (=) off and enter the customerID. If you are an account administrator, you can use the my_customer alias with the expression toggle off.
projection - Optional. Set the expression toggle (=) off and enter
custom
orfull
in the Filter value field to retrieve the schema field.customFieldMask - Optional. Set the expression toggle (=) off and list the custom fields to retrieve custom schema fields.
You can fetch custom fields in a user profile by a comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when
projection=custom.
User.Photo
- userKey - Required. Set the expression toggle (=) off and enter the userKey.
OrgUnit
- customerID - Required. Set the expression toggle (=) off and enter the customerID.
- GetOrgUnitPath - Required to call the OrgUnits Get API. Set the expression toggle (=) off and list the name of the org without a preceding slash (that is, TestOrg instead of /TestOrg).
- ListOrgUnitPath - Required to call the OrgUnits List API. Set the expression toggle (=) off and list the name of the org without a preceding slash (that is, TestOrg instead of /TestOrg).
- type - An optional parameter from the OrgUnits List API. Set the expression toggle (=) off and enter all | children.
- fields - An optional parameter for either the OrgUnits Get API or the OrgUnits List API. Set the expression toggle (=) off and list the fields to return, separated by a comma. See the API documentation referenced at the bottom of the page for the complete list of fields.
Group
- groupKey - Required for Groups Get API. Set the expression toggle (=) off and enter the groupKey.
- customer - Set the expression toggle (=) off and enter the customerID. If you are an account administrator, you can use the my_customer alias with the expression toggle off.
- domain - Optional. Set the expression toggle (=) off and enter the domain.
- maxResults - Optional. Set the expression toggle (=) off and enter an integer.
- fields - Optional. Set the expression toggle (=) off and list the fields to return, separated by a comma. See the API documentation referenced at the bottom of the page for the complete list of fields.
- userKey - Optional. Set the expression toggle (=) off and enter the userKey. Returns all groups to which this user belongs.
Troubleshooting
Error | Reason | Resolution |
---|---|---|
|
| Provide the customerID as Google Service Account is not associated with any customer. Ensure that the scope is correctly defined for the action/resource being executed. |
| Either provide customer or domain information as Google Service Account is not associated with any customer or domain. |
Examples
Refer to the example - Perform End-to-End Operations in Google Directory.
The following tables provides sample:
Resource | Filter key | Filter value | Result |
---|---|---|---|
userPhoto | userkey | (expression toggle (=) off) user@example.com | Returns the resource data for the user's photo. |
user | [None] | [None] | Returns all users. |
user | domain | (expression toggle (=) off) example.com | Returns all users within the specified domain. |
user | showDeleted | (expression toggle (=) off) true | Returns deleted users. |
user | customer | (expression toggle (=) off) my_customer | Returns all users for the customer ID if the account is an account administrator. |
user | fields | (expression toggle (=) off) users(aliases,name,primaryEmail) | Returns the name, primary email and email aliases for all users. |
user | query | (expression toggle (=) off) isAdmin=true | Returns all admins. |
user | query | (expression toggle (=) off) givenName:Tim* | Returns all users whose givenName starts with Tim. |
orgunit | fields | (expression toggle (=) off) kind,name,orgUnitPath | Returns kind,name,orgUnitPath fields of the orgunits. |
See Also
- For users:
- For user photo: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users.photos/get
- For groups:
- For org units:
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.