命名空间:microsoft.graph
读取 endUserNotification 对象的属性和关系。
此 API 可用于以下国家级云部署。
全局服务 |
美国政府 L4 |
美国政府 L5 (DOD) |
由世纪互联运营的中国 |
✅ |
❌ |
❌ |
❌ |
权限
要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限。
权限类型 |
权限(从最低特权到最高特权) |
委派(工作或学校帐户) |
AttackSimulation.Read.All、AttackSimulation.ReadWrite.All |
委派(个人 Microsoft 帐户) |
不支持。 |
应用程序 |
AttackSimulation.Read.All、AttackSimulation.ReadWrite.All |
HTTP 请求
GET /security/attackSimulation/endUserNotifications
可选的查询参数
此方法当前不支持 OData 查询参数 来自定义响应。
名称 |
说明 |
Authorization |
持有者 {token}。 必填。 详细了解 身份验证和授权。 |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应正文中返回响应 200 OK
代码和 endUserNotification 对象。
示例
请求
以下示例显示了一个请求。
GET https://graph.microsoft.com/v1.0/security/attackSimulation/endUserNotifications
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.AttackSimulation.EndUserNotifications.GetAsync();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
endUserNotifications, err := graphClient.Security().AttackSimulation().EndUserNotifications().Get(context.Background(), nil)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EndUserNotificationCollectionResponse result = graphClient.security().attackSimulation().endUserNotifications().get();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
let endUserNotifications = await client.api('/security/attackSimulation/endUserNotifications')
.get();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->security()->attackSimulation()->endUserNotifications()->get()->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.Security
Get-MgSecurityAttackSimulationEndUserNotification
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.security.attack_simulation.end_user_notifications.get()
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "1cdfcb49-1065-46a6-b1c3-672071e20a6b",
"displayName": "Microsoft End User Notification Page",
"description": "Microsoft End User Notification ",
"notificationType": "PositiveReinforcement",
"status": "Ready",
"source": "Global",
"createdBy": {
"email": "alexwaber@contoso.com",
"id": "1rdfcb49-1065-46a6-b1c3-672071e20a6b",
"displayName": "Alex Waber"
},
"createdDateTime": "2022-01-12T03:15:01.5906699Z",
"lastModifiedBy": {
"email": "alexwaber@contoso.com",
"id": "1rdfcb49-1065-46a6-b1c3-672071e20a6b",
"displayName": "Alex Waber"
},
"lastModifiedDateTime": "2021-10-07T12:23:18.8157586Z",
"supportedLocales": [
"en-us",
"de-de"
]
}