mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-21 06:31:37 +00:00
Some checks failed
Build and test GAM / build (Win64, build, 7, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 8, ubuntu-24.04, 3.13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 9, ubuntu-24.04, 3.9) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
189 lines
7.7 KiB
Markdown
189 lines
7.7 KiB
Markdown
# Domain People - Contacts & Profiles
|
|
- [API documentation](#api-documentation)
|
|
- [Collections of Users](Collections-of-Users)
|
|
- [Notes](#notes)
|
|
- [Definitions](#definitions)
|
|
- [Display Domain Contacts](#display-domain-contacts)
|
|
- [Display Domain Profiles](#display-domain-profiles)
|
|
|
|
## API documentation
|
|
* https://developers.google.com/contacts/v3/announcement
|
|
* https://developers.google.com/people/contacts-api-migration
|
|
* https://developers.google.com/people
|
|
* https://developers.google.com/people/api/rest/v1/people/listDirectoryPeople
|
|
* https://developers.google.com/people/api/rest/v1/people/searchDirectoryPeople
|
|
|
|
## Notes
|
|
To use these features you must add the `People API` to your project and authorize the appropriate scopes:
|
|
* `Client Access` - `People Directory API - read only`
|
|
* `Service Account Access`
|
|
* `People Directory API - read only`: https://www.googleapis.com/auth/directory.readonly
|
|
* `OAuth2 API`: https://www.googleapis.com/auth/userinfo.profile
|
|
```
|
|
gam update project
|
|
gam oauth create
|
|
gam user user@domain.com check serviceaccount
|
|
```
|
|
|
|
## Definitions
|
|
```
|
|
<PeopleResourceName> ::= people/<String>
|
|
<PeopleResourceNameList> ::= "<PeopleResourceName>(,<PeopleResourceName>)*"
|
|
<PeopleResourceNameEntity> ::=
|
|
<PeopleResourceNameNameList> | <FileSelector> | <CSVFileSelector> | <CSVDataSelector>
|
|
See: https://github.com/GAM-team/GAM/wiki/Collections-of-Items
|
|
|
|
<PeopleSourceName> ::=
|
|
contact|contacts|
|
|
profile|profiles
|
|
|
|
<PeopleMergeSourceName> ::=
|
|
contact|contacts
|
|
|
|
<PeopleFieldName> ::=
|
|
addresses|
|
|
ageranges|
|
|
biographies|
|
|
birthdays|
|
|
calendarurls|
|
|
clientdata|
|
|
coverphotos|
|
|
emailaddresses|
|
|
events|
|
|
externalids|
|
|
genders|
|
|
imclients|
|
|
interests|
|
|
locales|
|
|
locations|
|
|
memberships|
|
|
metadata|
|
|
misckeywords|
|
|
names|
|
|
nicknames|
|
|
occupations|
|
|
organizations|
|
|
phonenumbers|
|
|
photos|
|
|
relations|
|
|
sipaddresses|
|
|
skills|
|
|
urls|
|
|
userdefined
|
|
<PeopleFieldNameList> ::= "<PeopleFieldName>(,<PeopleFieldName>)*"
|
|
```
|
|
|
|
## Display Domain Contacts
|
|
### Display as an indented list of keys and values.
|
|
```
|
|
gam info domaincontacts <PeopleResourceNameEntity>
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson]
|
|
```
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as an indented list of keys and values.
|
|
* `formatjson` - Display the fields in JSON format.
|
|
```
|
|
gam show domaincontacts
|
|
[query <String>]
|
|
[mergesources <PeopleMergeSourceName>]
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson]
|
|
```
|
|
By default, Gam displays all domain contacts.
|
|
* `query <String>` - Display contacts based on the data in their fields.
|
|
|
|
Google's explanation of `mergesources`: Additional data to merge into the directory sources
|
|
if they are connected through verified join keys such as email addresses or phone numbers.
|
|
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as an indented list of keys and values.
|
|
* `formatjson` - Display the fields in JSON format.
|
|
|
|
### Display as a CSV file.
|
|
```
|
|
gam print domaincontacts [todrive <ToDriveAttribute>*]
|
|
[query <String>]
|
|
[mergesources <PeopleMergeSourceName>]
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson [quotechar <Character>]]
|
|
```
|
|
By default, Gam displays all domain contacts.
|
|
* `query <String>` - Display contacts based on the data in their fields.
|
|
|
|
Google's explanation of `mergesources`: Additional data to merge into the directory sources
|
|
if they are connected through verified join keys such as email addresses or phone numbers.
|
|
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
|
* `formatjson` - Display the fields in JSON format.
|
|
|
|
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
|
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
|
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
|
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
|
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
|
|
|
## Display Domain Profiles
|
|
### Display as an indented list of keys and values.
|
|
```
|
|
gam info domainprofiles|people|peopleprofiles <PeopleResourceNameEntity>
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson]
|
|
```
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as an indented list of keys and values.
|
|
* `formatjson` - Display the fields in JSON format.
|
|
```
|
|
gam show domainprofiles|people|peopleprofiles
|
|
[query <String>]
|
|
[mergesources <PeopleMergeSourceName>]
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson]
|
|
```
|
|
By default, Gam displays all domain profiles.
|
|
* `query <String>` - Display profiles based on the data in their fields.
|
|
|
|
Google's explanation of `mergesources`: Additional data to merge into the directory sources
|
|
if they are connected through verified join keys such as email addresses or phone numbers.
|
|
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as an indented list of keys and values.
|
|
* `formatjson` - Display the fields in JSON format.
|
|
|
|
### Display as a CSV file.
|
|
```
|
|
gam print domainprofiles|people|peopleprofiles [todrive <ToDriveAttribute>*]
|
|
[query <String>]
|
|
[mergesources <PeopleMergeSourceName>]
|
|
[allfields|(fields <PeopleFieldNameList>)]
|
|
[formatjson [quotechar <Character>]]
|
|
```
|
|
By default, Gam displays all domain profiles.
|
|
* `query <String>` - Display profiles based on the data in their fields.
|
|
|
|
Google's explanation of `mergesources`: Additional data to merge into the directory sources
|
|
if they are connected through verified join keys such as email addresses or phone numbers.
|
|
|
|
By default, Gam displays the fields `names,emailaddresses`.
|
|
* `allfields|(fields <PeopleFieldNameList>)` - Select fields to display
|
|
|
|
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
|
* `formatjson` - Display the fields in JSON format.
|
|
|
|
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
|
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
|
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
|
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
|
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|