0

I have setup watch channels for the User resource via the Google Directory API to receive push notifications when the resource changes or is created.

When my app receives a notification, it reads the e-mail of the user which was changed/created, then calls the users.get endpoint of the Directory API to get the latest data for that user and finally updates my database with that data.

In most cases this flow works fine, but I've observed that every now and then when a new user is created, the response from the users.get endpoint does not include the orgUnitPath property. It's not set to null, it's not even there. However, if I hit the endpoint again a while later, the property is there.

Does anyone know why this happens?

rok
  • 557
  • 4
  • 20
  • How long does it take for the `orgUnitPath` to get populated? I'm tempted to say this could be that the system doesn't have time to create all fields for the newly created user before the get request. – Iamblichus Jan 30 '20 at 10:59
  • I can't give an accurate answer on how long it takes, because I usually tried to hit the endpoint again hours later when I discovered this had occurred. – rok Jan 30 '20 at 12:48
  • I cannot reproduce this issue, but if you think this can be a bug, please consider creating an issue in [Google Issue Tracker](https://issuetracker.google.com/components/191635#basic), and provide clear and concise reproduction steps that will reliably reproduce this. – Iamblichus Jan 31 '20 at 13:23

0 Answers0