更新 secureScoreControlProfile
命名空间:microsoft.graph
更新任何集成解决方案中的可编辑 secureScoreControlProfile 对象以更改各种属性,例如 assignedTo 或 tenantNote。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
SecurityEvents.ReadWrite.All |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| Application |
SecurityEvents.ReadWrite.All |
HTTP 请求
PATCH /security/secureScoreControlProfiles/{id}
| 名称 |
说明 |
| Authorization |
持有者 {code}。必需。 |
| Prefer |
return=representation。 |
请求正文
在请求正文中,为应更新的相关字段提供值的 JSON 表示形式。 正文 必须 包含 vendorInformation 具有有效 provider 字段和字段的 vendor 属性。 下表列出了可以针对 secureScoreControlProfile 进行更新的字段。 请求正文中未包含的现有属性的值不会更改。 为了获得最佳性能,请勿加入尚未更改的现有值。
| 属性 |
类型 |
说明 |
| assignedTo |
String |
为会审、实现或修正分配控件的分析员的名称。 |
| 注释 |
String |
分析师对客户控制管理) 控制 (的评论。 |
| state |
String |
控件上的分析师驱动设置。 可取值为:Default、Ignored、ThirdParty、Reviewed。 |
| vendorInformation |
securityVendorInformation |
复杂类型,包含有关安全产品/服务供应商、提供程序和子保护程序 (的详细信息,例如,供应商=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"
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var secureScoreControlProfile = 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"}
}
};
await graphClient.Security.SecureScoreControlProfiles["{secureScoreControlProfile-id}"]
.Request()
.UpdateAsync(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 文档。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/security/secureScoreControlProfiles/NonOwnerAccess"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphSecureScoreControlProfile *secureScoreControlProfile = [[MSGraphSecureScoreControlProfile alloc] init];
[secureScoreControlProfile setAssignedTo:@""];
[secureScoreControlProfile setComment:@"control is reviewed"];
[secureScoreControlProfile setState:@"Reviewed"];
MSGraphSecurityVendorInformation *vendorInformation = [[MSGraphSecurityVendorInformation alloc] init];
[vendorInformation setProvider:@"SecureScore"];
[vendorInformation setProviderVersion: null];
[vendorInformation setSubProvider: null];
[vendorInformation setVendor:@"Microsoft"];
[secureScoreControlProfile setVendorInformation:vendorInformation];
NSError *error;
NSData *secureScoreControlProfileData = [secureScoreControlProfile getSerializedDataWithError:&error];
[urlRequest setHTTPBody:secureScoreControlProfileData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档。
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
SecureScoreControlProfile secureScoreControlProfile = new SecureScoreControlProfile();
secureScoreControlProfile.assignedTo = "";
secureScoreControlProfile.comment = "control is reviewed";
secureScoreControlProfile.state = "Reviewed";
SecurityVendorInformation vendorInformation = new SecurityVendorInformation();
vendorInformation.provider = "SecureScore";
vendorInformation.providerVersion = null;
vendorInformation.subProvider = null;
vendorInformation.vendor = "Microsoft";
secureScoreControlProfile.vendorInformation = vendorInformation;
graphClient.security().secureScoreControlProfiles("NonOwnerAccess")
.buildRequest()
.patch(secureScoreControlProfile);
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewSecureScoreControlProfile()
vendorInformation := msgraphsdk.NewSecurityVendorInformation()
requestBody.SetVendorInformation(vendorInformation)
provider := "SecureScore"
vendorInformation.SetProvider(&provider)
vendorInformation.SetProviderVersion(nil)
vendorInformation.SetSubProvider(nil)
vendor := "Microsoft"
vendorInformation.SetVendor(&vendor)
requestBody.SetAdditionalData(map[string]interface{}{
"assignedTo": "",
"comment": "control is reviewed",
"state": "Reviewed",
}
secureScoreControlProfileId := "secureScoreControlProfile-id"
graphClient.Security().SecureScoreControlProfilesById(&secureScoreControlProfileId).Patch(requestBody)
有关如何将 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 文档。
响应
下面是成功响应的示例。
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"
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var secureScoreControlProfile = 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"}
}
};
await graphClient.Security.SecureScoreControlProfiles["{secureScoreControlProfile-id}"]
.Request()
.UpdateAsync(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 文档。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/security/secureScoreControlProfiles/NonOwnerAccess"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphSecureScoreControlProfile *secureScoreControlProfile = [[MSGraphSecureScoreControlProfile alloc] init];
[secureScoreControlProfile setAssignedTo:@""];
[secureScoreControlProfile setComment:@"control is reviewed"];
[secureScoreControlProfile setState:@"Reviewed"];
MSGraphSecurityVendorInformation *vendorInformation = [[MSGraphSecurityVendorInformation alloc] init];
[vendorInformation setProvider:@"SecureScore"];
[vendorInformation setProviderVersion: null];
[vendorInformation setSubProvider: null];
[vendorInformation setVendor:@"Microsoft"];
[secureScoreControlProfile setVendorInformation:vendorInformation];
NSError *error;
NSData *secureScoreControlProfileData = [secureScoreControlProfile getSerializedDataWithError:&error];
[urlRequest setHTTPBody:secureScoreControlProfileData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewSecureScoreControlProfile()
vendorInformation := msgraphsdk.NewSecurityVendorInformation()
requestBody.SetVendorInformation(vendorInformation)
provider := "SecureScore"
vendorInformation.SetProvider(&provider)
vendorInformation.SetProviderVersion(nil)
vendorInformation.SetSubProvider(nil)
vendor := "Microsoft"
vendorInformation.SetVendor(&vendor)
requestBody.SetAdditionalData(map[string]interface{}{
"assignedTo": "",
"comment": "control is reviewed",
"state": "Reviewed",
}
secureScoreControlProfileId := "secureScoreControlProfile-id"
graphClient.Security().SecureScoreControlProfilesById(&secureScoreControlProfileId).Patch(requestBody)
有关如何将 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 文档。
响应
下面是使用可选 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"
}
}