1

Say, I want to use Google Apps Provisioning API to retrieve my domain users and synchronize them into my Google Datastore. I want this to be done at GAE Cron Job, but GAE Cron is not the logged on user and it doesn't have any credential to call Google Apps Provisioning API. Is there way to impersonate a specific user to call Google Apps Provisioning API?

lannyboy
  • 617
  • 1
  • 10
  • 20

1 Answers1

0

You need to get an OAuth 2.0 token for the user you wish to impersonate and ensure that access_type=offline is set. Then with the stored refresh token, you can get a current access token for the user and perform the cron actions even without the user "present".

Jay Lee
  • 13,415
  • 3
  • 28
  • 59