0

I want to get notifications when an admin adds a user in a group in Google Workspace. And I call the Watch method to do it:

var channel = new Google.Apis.Admin.Reports.reports_v1.Data.Channel
{
    Address = address,
    Type = "web_hook",
    Token = "token",
    Id = "new random guid"
};
var request = reportService.Activities.Watch(
    channel,
    "all",
    ActivitiesResource.WatchRequest.ApplicationNameEnum.Groups
);
var response = await request.ExecuteAsync(token);
  • I checked Admin and GroupsEnterprise options instead of Groups - nothing
  • I passed startTime and endTime - nothing
  • I put admin's email and its client id instead of "all" - nothing
  • I specified eventName as well - nothing

For every options above I get successfully created channel and the 'sync' state in the header (X-Goog-Resource-State). I repeat: i get the "sync" event as it's described in the documentation. Then I remove users from groups and add users to groups in Admin Console (https://admin.google.com/ac/groups) and do the same things in Groups (https://groups.google.com/my-groups). And even after several hours I don't receive any other events I see the events in Admin Console (Reporting -> Audit and investigation -> Admin/Groups log events) I can list these events in my code like:

var request = reportService.Activities.List("all", ActivitiesResource.ListRequest.ApplicationNameEnum.Groups);
var response = await request .ExecuteAsync();

They are existing. But I don't receive notifications but the 'sync'.

What's going on?

2
  • Have you checked if the response to the sync request is a successful 200 status code? Commented Nov 3 at 3:21
  • Sure! I return OkResult. I do the same for directory notifications (when a user is updated) and they work Commented Nov 4 at 6:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.