获取Microsoft Teams 紧急呼叫事件更新的更改通知
Microsoft Teams 支持紧急呼叫通知。 可以路由这些通知,以通知 Teams 中的特定安全人员。 Microsoft Graph 的紧急呼叫事件通知扩展了此功能,允许在 Teams (外部接收紧急呼叫通知,例如,自定义客户端应用程序) ,如下图所示。
- Teams 租户管理员为租户配置 紧急呼叫 。
- 客户端应用程序创建Microsoft Graph 紧急调用事件订阅。
- 当 Teams 用户发出紧急呼叫时,会向客户端应用程序发出紧急呼叫事件通知, (例如 Teams 上的 911) 。
- 客户端应用程序在过期之前 续订 现有订阅,或在过期后 创建 一个新订阅,以继续订阅紧急呼叫事件通知。
权限
权限类型 | 权限(从最低特权到最高特权) | 支持的版本 |
---|---|---|
委派(工作或学校帐户) | 不支持。 | 不支持。 |
委派(个人 Microsoft 帐户) | 不支持。 | 不支持。 |
应用程序 | CallEvents-Emergency.Read.All | Beta. |
订阅紧急呼叫启动事件
若要在拨打紧急呼叫策略号码时订阅,请将订阅有效负载中的 属性设置为 resource
communications/calls/getEmergencyEventsByPolicy(policyName='{policyName}')
,并将 {policyName}
字段替换为为组织配置的策略名称。
紧急呼叫事件的订阅仅支持丰富的通知。
true
设置为 includeResourceData
,并为 提供 base64 编码的证书值,并为 encryptionCertificate
encryptionCertificateId
提供字符串标识符。 有关详细信息,请参阅 设置包含资源数据的更改通知。
紧急呼叫事件的订阅的最长订阅生存期为一天。 若要将订阅保留更长时间,请更新订阅的 expirationDateTime 属性。 有关详细信息,请参阅 更新订阅 API。
注意
每个应用程序、租户和策略名称组合的订阅限制为一个订阅。 使用与另一个应用程序、租户和紧急策略相同的另一个订阅将失败并显示 HTTP 状态代码 409,这意味着订阅请求已重复,无法创建。
订阅有效负载示例
POST https://graph.microsoft.com/beta/subscriptions
Content-Type: application/json
{
"changeType": "updated",
"notificationUrl": "https://contoso.com/notificationUrl",
"resource": "communications/calls/getEmergencyEventsByPolicy(policyName='EmergencyPolicy')",
"includeResourceData": true,
"encryptionCertificate": "{base64encodedCertificate}",
"encryptionCertificateId": "{customId}",
"expirationDateTime": "2021-02-01T11:00:00.0000000Z",
"clientState": "{secretClientState}"
}
有关订阅请求的属性定义,请参阅 订阅资源。
紧急呼叫事件通知
启动具有适用紧急呼叫策略的呼叫时,将触发紧急呼叫通知。
通知有效负载示例
POST https://contoso.com/notificationUrl
Content-Type: application/json
{
"value": [{
"subscriptionId": "{Subscription id}",
"clientState": "{secret client state}",
"changeType": "updated",
"tenantId": "00000000-0000-0000-0000-000000000000",
"resource": "communications/calls/getEmergencyEventsByPolicy(policyName='EmergencyPolicy')",
"subscriptionExpirationDateTime": "2021-02-01T11:00:00.0000000Z",
"resourceData": {
"@odata.id": "communications/calls/getEmergencyEventsByPolicy(policyName='EmergencyPolicy')",
"@odata.type": "#microsoft.graph.emergencyCallEvent",
"id": "11111111-0000-0000-0000-000000000000",
},
"organizationId": "00000000-0000-0000-0000-000000000000",
"encryptedContent": {
"data": "{Encrypted content}",
"dataSignature": "{Encrypted data signature}",
"dataKey": "{Encrypted data key for encrypting content}",
"encryptionCertificateId": "{User specified id of encryption certificate}",
"encryptionCertificateThumbprint": "{Encrpytion certification thumbprint}"
}
}],
"validationTokens": ["{Validation Tokens}"]
}
解密的通知资源数据示例
{
"@odata.id": "communications/calls/getEmergencyEventsByPolicy(policyName='EmergencyPolicy')",
"@odata.type": "#microsoft.graph.emergencyCallEvent",
"id": "11111111-0000-0000-0000-000000000000",
"emergencyCallEvent": {
"id": "11111111-0000-0000-0000-000000000000",
"callEventType": "callStarted",
"policyName": "EmergencyPolicy",
"eventDateTime": "2024-01-01T10:00:00.0000000+00:00",
"emergencyNumberDialed": "{emergencyNumberDialed}",
"callerInfo": {
"displayName": "Emergency caller display name",
"upn": "emergencyCaller@contoso.com",
"phoneNumber": "00000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"location": {
"address": {
"street": "Microsoft Way",
"city": "Redmond",
"state": "WA",
"countryOrRegion": "United States",
"postalCode": "00000",
"additionalData": {
"companyName": "Company name",
"additionalInfo": "700",
"houseNumber": "725",
"county": "County",
"streetSuffix": "Street suffix"
}
},
"coordinates": {
"latitude": "00.0000",
"longitude": "00.0000"
}
}
}
}
}