Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCP: err. 404 when requesting PeopleAPI, using API delegation from Workspace domain

Requesting the people api from a golang app on AppEngine returns 404 errors.
Same request (using same userID) done with the API Explorer returns expected result

Error: Error 404: Requested entity was not found., notFound

The goal is to request 'PersonFields.photos'
UserID are valid.


- Golang v116 deployed on AppEngine.
- Using googleapi library from golang.
- Service account used for Google Workspace Delegation is the default "Service account client".
- Domain wide delegation is activated on Google Workspace domain, service account has scope 'admin.directory.use'
- Requests made to PeopleAPI.
- PeopleAPI is enabled

Solved Solved
0 2 1,305
1 ACCEPTED SOLUTION

Thank you for your reply

The issue was actually caused by not requesting to the correct FQDN associated with the Google Workspace domain. The main FQDN of the Google Workspace domain was changed from .CA to .COM some time ago but the change was not applied on the GCP project. The requests were failling beacause no users were tied to the .CA Google Workspace domain anymore.

View solution in original post

2 REPLIES 2

Hi @MarkSmith,

Welcome to the Google Cloud Community!

Make sure that you have done the following before using People API:

  1. Get a Google Account
  2. Create a Project for your Client
  3. Set up your Application

In setting up your application, using client libraries, you have to setup authorization before you can make requests to the API.

Also, take a look at this quickstart guide in using Go.

If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

Thank you for your reply

The issue was actually caused by not requesting to the correct FQDN associated with the Google Workspace domain. The main FQDN of the Google Workspace domain was changed from .CA to .COM some time ago but the change was not applied on the GCP project. The requests were failling beacause no users were tied to the .CA Google Workspace domain anymore.