0

We've been using the google people api to list internal contacts in a custom staff directory on our company's intranet. We've been using the people api so that we can retrieve profile pictures as well as standard profile fields, as the pictures are blocked when using the google Admin SDK. However we've noticed recently that certain contacts are missing from the people API (e.g. new starters).

I've tried using the Admin SDK users.list method to return the users, and can see that the new users definitely exist in the directory, but using the people.listDirectoryPeople method the same users aren't being returned. Is there a way to sync up the directory people contacts list and the admin directory users list? Or is there something I'm missing in my request that's causing me to retrieve old data?

This is a code snippet to show the parameters I'm using with the API (further down there's more code which gets the other pages of results):

    authenticate().then((res) => {
      let token = res as JWT;
      const service = google.people({ version: 'v1', auth: token });
      let params: people_v1.Params$Resource$People$Listdirectorypeople = {
        readMask: 'addresses,photos,emailAddresses,locations,names,organizations,phoneNumbers,relations',
        pageSize: 500,
        sources: ['DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE'],
      };
      service.people.listDirectoryPeople(params, async (err, res) => {

0 Answers0