Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 通过Microsoft Graph观察outlook事件_Javascript_Azure Active Directory_Microsoft Graph Api_Microsoft Graph Sdks_Microsoft Graph Calendar - Fatal编程技术网

Javascript 通过Microsoft Graph观察outlook事件

Javascript 通过Microsoft Graph观察outlook事件,javascript,azure-active-directory,microsoft-graph-api,microsoft-graph-sdks,microsoft-graph-calendar,Javascript,Azure Active Directory,Microsoft Graph Api,Microsoft Graph Sdks,Microsoft Graph Calendar,我想使用Microsoft Graph观察Office 365 Outlook日历事件。我用这个包创建了一个客户端实例,并知道如何从特定用户获取事件 const usersResponse: any = await client.api('/users').get(); const allUsers: any[] = usersResponse.value; const firstUser: any = allUsers[0]; const firstUserId = firstUser.id;

我想使用Microsoft Graph观察Office 365 Outlook日历事件。我用这个包创建了一个客户端实例,并知道如何从特定用户获取事件

const usersResponse: any = await client.api('/users').get();
const allUsers: any[] = usersResponse.value;
const firstUser: any = allUsers[0];
const firstUserId = firstUser.id;
const userEvents = await client.api(`/users/${firstUserId}/calendar/events`).get();
我基本上想做的是获取创建、编辑或删除的每个事件,但不是针对特定用户。当然,我可以获取所有用户并从他们那里获取所有事件,但是我也必须观察用户,因为有些用户可能会被添加或删除

我想实时收听所有“公司”活动。我认为每X秒进行一次投票是一种糟糕的方法。我正在寻找我可以订阅喜欢的活动

  • calendar.on('init',eventsFromNow=>{})
  • calendar.on('eventCreated',event=>{})
  • calendar.on('eventEdited',event=>{})
  • calendar.on('eventDeleted',event=>{})

有什么我可以使用的吗?

这不是一个受支持的方案


更重要的是,考虑一下规模会是什么样子。您所要求的是对整个组织中的每个evert、每个用户和组进行主动监控。像这样监控的计算成本将是惊人的。

是的,你是对的。我的公司是一个非常小的组织,所以我想尝试一下。。。我是否必须每X秒轮询一次用户、组及其事件?您必须编写自己的轮询逻辑并自行处理
429
节流问题。