问题
I have looked into the G Suite admin APIs and found this function:
GET https://www.googleapis.com/admin/directory/v1/users
I get a list of all users, but no users in the list have a phone number. How can I include the user's phone number in the list?
I would also like to know how to get a list of every user's group memberships if this is possible.
回答1:
The phone number property is under user Resource which you might have missed since it's also located in the Users.list under Response.
{
"kind": "admin#directory#users",
"etag": etag,
"users": [
users Resource
],
"nextPageToken": string
}
which when you click leads to the full User Resources which then contains the phones
property including others.
"phones": [
{
"value": string,
"primary": boolean,
"type": string,
"customType": string
}
],
"phones": string
来源:https://stackoverflow.com/questions/45105446/get-list-of-users-with-name-phone-number-and-group-memberships-from-g-suite