0

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.

www.jensolsson.se
  • 3,023
  • 2
  • 35
  • 65

1 Answers1

0

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
ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56