更新 secureScoreControlProfile
本文内容
命名空间:microsoft.graph
更新任何集成解决方案中的可编辑 secureScoreControlProfile 对象,以更改各种属性,例如 assignedTo 或 tenantNote 。
此 API 可用于以下国家级云部署 。
全局服务
美国政府 L4
美国政府 L5 (DOD)
由世纪互联运营的中国
✅
✅
✅
❌
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时 ,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型 。 要了解有关这些权限的详细信息,请参阅 权限参考 。
权限类型
最低特权权限
更高特权权限
委派(工作或学校帐户)
SecurityEvents.ReadWrite.All
不可用。
委派(个人 Microsoft 帐户)
不支持。
不支持。
应用程序
SecurityEvents.ReadWrite.All
不可用。
HTTP 请求
PATCH /security/secureScoreControlProfiles/{id}
名称
说明
Authorization
Bearer {code}。 必需。
Prefer
return=representation。
请求正文
在请求正文中,提供应更新的相关字段的值的 JSON 表示形式。 正文 必须 包含 vendorInformation
具有有效 provider
和 vendor
字段的属性。 下表列出了可为 secureScoreControlProfile 更新的字段。 请求正文中未包含的现有属性的值不会更改。 为了获得最佳性能,请勿加入尚未更改的现有值。
属性
类型
说明
assignedTo
String
为会审、实现或修正分配控件的分析师的名称。
注释
String
分析人员对客户控制管理 () 的评论。
state
String
控件上的分析师驱动设置。 可取值为:Default
、Ignored
、ThirdParty
、Reviewed
。
vendorInformation
securityVendorInformation
包含安全产品/服务供应商、提供商和子 (的详细信息的复杂类型,例如 vendor=Microsoft;provider=SecureScore;) 。 提供程序和供应商字段是必需的。
响应
如果成功,此方法返回 204 No Content
响应代码。
如果使用可选的请求标头,该方法将在响应正文中返回 200 OK
响应代码和更新的 secureScoreControlProfiles 对象。
示例
请求
以下示例显示了一个请求。
PATCH https://graph.microsoft.com/v1.0/security/secureScoreControlProfiles/NonOwnerAccess
Content-type: application/json
{
"assignedTo": "",
"comment": "control is reviewed",
"state": "Reviewed",
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SecureScoreControlProfile
{
VendorInformation = new SecurityVendorInformation
{
Provider = "SecureScore",
ProviderVersion = null,
SubProvider = null,
Vendor = "Microsoft",
},
AdditionalData = new Dictionary<string, object>
{
{
"assignedTo" , ""
},
{
"comment" , "control is reviewed"
},
{
"state" , "Reviewed"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.SecureScoreControlProfiles["{secureScoreControlProfile-id}"].PatchAsync(requestBody);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
mgc security secure-score-control-profiles patch --secure-score-control-profile-id {secureScoreControlProfile-id} --body '{\
"assignedTo": "",\
"comment": "control is reviewed",\
"state": "Reviewed",\
"vendorInformation": {\
\
"provider": "SecureScore",\
"providerVersion": null,\
"subProvider": null,\
"vendor": "Microsoft"\
}\
}\
'
有关如何将 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewSecureScoreControlProfile()
vendorInformation := graphmodels.NewSecurityVendorInformation()
provider := "SecureScore"
vendorInformation.SetProvider(&provider)
providerVersion := null
vendorInformation.SetProviderVersion(&providerVersion)
subProvider := null
vendorInformation.SetSubProvider(&subProvider)
vendor := "Microsoft"
vendorInformation.SetVendor(&vendor)
requestBody.SetVendorInformation(vendorInformation)
additionalData := map[string]interface{}{
"assignedTo" : "",
"comment" : "control is reviewed",
"state" : "Reviewed",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
secureScoreControlProfiles, err := graphClient.Security().SecureScoreControlProfiles().BySecureScoreControlProfileId("secureScoreControlProfile-id").Patch(context.Background(), requestBody, nil)
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SecureScoreControlProfile secureScoreControlProfile = new SecureScoreControlProfile();
SecurityVendorInformation vendorInformation = new SecurityVendorInformation();
vendorInformation.setProvider("SecureScore");
vendorInformation.setProviderVersion(null);
vendorInformation.setSubProvider(null);
vendorInformation.setVendor("Microsoft");
secureScoreControlProfile.setVendorInformation(vendorInformation);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("assignedTo", "");
additionalData.put("comment", "control is reviewed");
additionalData.put("state", "Reviewed");
secureScoreControlProfile.setAdditionalData(additionalData);
SecureScoreControlProfile result = graphClient.security().secureScoreControlProfiles().bySecureScoreControlProfileId("{secureScoreControlProfile-id}").patch(secureScoreControlProfile);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
const options = {
authProvider,
};
const client = Client.init(options);
const secureScoreControlProfile = {
assignedTo: '',
comment: 'control is reviewed',
state: 'Reviewed',
vendorInformation: {
provider: 'SecureScore',
providerVersion: null,
subProvider: null,
vendor: 'Microsoft'
}
};
await client.api('/security/secureScoreControlProfiles/NonOwnerAccess')
.update(secureScoreControlProfile);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SecureScoreControlProfile;
use Microsoft\Graph\Generated\Models\SecurityVendorInformation;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SecureScoreControlProfile();
$vendorInformation = new SecurityVendorInformation();
$vendorInformation->setProvider('SecureScore');
$vendorInformation->setProviderVersion(null);
$vendorInformation->setSubProvider(null);
$vendorInformation->setVendor('Microsoft');
$requestBody->setVendorInformation($vendorInformation);
$additionalData = [
'assignedTo' => '',
'comment' => 'control is reviewed',
'state' => 'Reviewed',
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->security()->secureScoreControlProfiles()->bySecureScoreControlProfileId('secureScoreControlProfile-id')->patch($requestBody)->wait();
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
Import-Module Microsoft.Graph.Security
$params = @{
assignedTo = ""
comment = "control is reviewed"
state = "Reviewed"
vendorInformation = @{
provider = "SecureScore"
providerVersion = $null
subProvider = $null
vendor = "Microsoft"
}
}
Update-MgSecuritySecureScoreControlProfile -SecureScoreControlProfileId $secureScoreControlProfileId -BodyParameter $params
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
from msgraph import GraphServiceClient
from msgraph.generated.models.secure_score_control_profile import SecureScoreControlProfile
from msgraph.generated.models.security_vendor_information import SecurityVendorInformation
graph_client = GraphServiceClient(credentials, scopes)
request_body = SecureScoreControlProfile(
vendor_information = SecurityVendorInformation(
provider = "SecureScore",
provider_version = None,
sub_provider = None,
vendor = "Microsoft",
),
additional_data = {
"assigned_to" : "",
"comment" : "control is reviewed",
"state" : "Reviewed",
}
)
result = await graph_client.security.secure_score_control_profiles.by_secure_score_control_profile_id('secureScoreControlProfile-id').patch(request_body)
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
响应
下面是成功响应的示例。
HTTP/1.1 204 No Content
请求
以下示例显示了一个包含 Prefer
请求标头的请求。
PATCH https://graph.microsoft.com/v1.0/security/secureScoreControlProfiles/NonOwnerAccess
Content-type: application/json
{
"assignedTo": "",
"comment": "control is reviewed",
"state": "Reviewed",
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SecureScoreControlProfile
{
VendorInformation = new SecurityVendorInformation
{
Provider = "SecureScore",
ProviderVersion = null,
SubProvider = null,
Vendor = "Microsoft",
},
AdditionalData = new Dictionary<string, object>
{
{
"assignedTo" , ""
},
{
"comment" , "control is reviewed"
},
{
"state" , "Reviewed"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Security.SecureScoreControlProfiles["{secureScoreControlProfile-id}"].PatchAsync(requestBody);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
mgc security secure-score-control-profiles patch --secure-score-control-profile-id {secureScoreControlProfile-id} --body '{\
"assignedTo": "",\
"comment": "control is reviewed",\
"state": "Reviewed",\
"vendorInformation": {\
"provider": "SecureScore",\
"providerVersion": null,\
"subProvider": null,\
"vendor": "Microsoft"\
}\
}\
'
有关如何将 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewSecureScoreControlProfile()
vendorInformation := graphmodels.NewSecurityVendorInformation()
provider := "SecureScore"
vendorInformation.SetProvider(&provider)
providerVersion := null
vendorInformation.SetProviderVersion(&providerVersion)
subProvider := null
vendorInformation.SetSubProvider(&subProvider)
vendor := "Microsoft"
vendorInformation.SetVendor(&vendor)
requestBody.SetVendorInformation(vendorInformation)
additionalData := map[string]interface{}{
"assignedTo" : "",
"comment" : "control is reviewed",
"state" : "Reviewed",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
secureScoreControlProfiles, err := graphClient.Security().SecureScoreControlProfiles().BySecureScoreControlProfileId("secureScoreControlProfile-id").Patch(context.Background(), requestBody, nil)
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SecureScoreControlProfile secureScoreControlProfile = new SecureScoreControlProfile();
SecurityVendorInformation vendorInformation = new SecurityVendorInformation();
vendorInformation.setProvider("SecureScore");
vendorInformation.setProviderVersion(null);
vendorInformation.setSubProvider(null);
vendorInformation.setVendor("Microsoft");
secureScoreControlProfile.setVendorInformation(vendorInformation);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("assignedTo", "");
additionalData.put("comment", "control is reviewed");
additionalData.put("state", "Reviewed");
secureScoreControlProfile.setAdditionalData(additionalData);
SecureScoreControlProfile result = graphClient.security().secureScoreControlProfiles().bySecureScoreControlProfileId("{secureScoreControlProfile-id}").patch(secureScoreControlProfile);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
const options = {
authProvider,
};
const client = Client.init(options);
const secureScoreControlProfile = {
assignedTo: '',
comment: 'control is reviewed',
state: 'Reviewed',
vendorInformation: {
provider: 'SecureScore',
providerVersion: null,
subProvider: null,
vendor: 'Microsoft'
}
};
await client.api('/security/secureScoreControlProfiles/NonOwnerAccess')
.update(secureScoreControlProfile);
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SecureScoreControlProfile;
use Microsoft\Graph\Generated\Models\SecurityVendorInformation;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SecureScoreControlProfile();
$vendorInformation = new SecurityVendorInformation();
$vendorInformation->setProvider('SecureScore');
$vendorInformation->setProviderVersion(null);
$vendorInformation->setSubProvider(null);
$vendorInformation->setVendor('Microsoft');
$requestBody->setVendorInformation($vendorInformation);
$additionalData = [
'assignedTo' => '',
'comment' => 'control is reviewed',
'state' => 'Reviewed',
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->security()->secureScoreControlProfiles()->bySecureScoreControlProfileId('secureScoreControlProfile-id')->patch($requestBody)->wait();
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
Import-Module Microsoft.Graph.Security
$params = @{
assignedTo = ""
comment = "control is reviewed"
state = "Reviewed"
vendorInformation = @{
provider = "SecureScore"
providerVersion = $null
subProvider = $null
vendor = "Microsoft"
}
}
Update-MgSecuritySecureScoreControlProfile -SecureScoreControlProfileId $secureScoreControlProfileId -BodyParameter $params
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
from msgraph import GraphServiceClient
from msgraph.generated.models.secure_score_control_profile import SecureScoreControlProfile
from msgraph.generated.models.security_vendor_information import SecurityVendorInformation
graph_client = GraphServiceClient(credentials, scopes)
request_body = SecureScoreControlProfile(
vendor_information = SecurityVendorInformation(
provider = "SecureScore",
provider_version = None,
sub_provider = None,
vendor = "Microsoft",
),
additional_data = {
"assigned_to" : "",
"comment" : "control is reviewed",
"state" : "Reviewed",
}
)
result = await graph_client.security.secure_score_control_profiles.by_secure_score_control_profile_id('secureScoreControlProfile-id').patch(request_body)
有关如何将 SDK 添加 到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档 。
响应
下面是使用可选 Prefer: return=representation
请求标头时的响应示例。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "NonOwnerAccess",
"azureTenantId": "00000001-0001-0001-0001-000000000001c",
"actionType": "Review",
"actionUrl": "https://outlook.office365.com/NonOwnerAccessReport.aspx",
"controlCategory": "Data",
"title": "Review mailbox access by non-owners bi-weekly",
"deprecated": false,
"implementationCost": "Low",
"lastModifiedDateTime": null,
"maxScore": 5.0,
"rank": 25,
"remediation": "Once you have opened the search tool, specify a date range and select access by <b>All non-owners</b> or <b>External users</b>",
"remediationImpact": "This change will have no effect on your users",
"service": "EXO",
"threats": [
"Account Breach",
"Data Exfiltration",
"Malicious Insider"
],
"tier": "Core",
"userImpact": "Low",
"complianceInformation": [
{
"certificationName": "FedRAMP_Moderate",
"certificationControls": [
{
"name": "AC-6(9)",
"url": "",
}
]
}
],
"controlStateUpdates": [
{
"assignedTo": "",
"comment": "control is reviewed",
"state": "Reviewed",
"updatedBy": "user1@contoso.com",
"updatedDateTime": "2019-03-19T22:37:14.628799Z"
}
],
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
}
}