secureScoreControlProfile aktualisieren
Artikel
07/18/2022
6 Minuten Lesedauer
3 Mitwirkende
In diesem Artikel
Namespace: microsoft.graph
Aktualisieren Sie ein bearbeitbares secureScoreControlProfile-Objekt in einer beliebigen integrierten Lösung, um verschiedene Eigenschaften wie "assignedTo " oder "tenantNote " zu ändern.
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
SecurityEvents.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
SecurityEvents.ReadWrite.All
HTTP-Anforderung
PATCH /security/secureScoreControlProfiles/{id}
Name
Beschreibung
Authorization
Bearer {code}. Erforderlich.
Prefer
return=representation.
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung der Werte für relevante Felder an, die aktualisiert werden sollen. Der Textkörper muss die vendorInformation Eigenschaft mit gültigen provider Und-Feldern vendor enthalten. In der folgenden Tabelle sind die Felder aufgeführt, die für ein secureScoreControlProfile-Objekt aktualisiert werden können. Die Werte für vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, ändern sich nicht. Geben Sie aus Gründen der Leistung vorhandene Werte, die nicht geändert wurden, nicht an.
Eigenschaft
Typ
Beschreibung
assignedTo
Zeichenfolge
Name des Analysten, dem das Steuerelement zur Triage, Implementierung oder Wartung zugewiesen ist.
comment
String
Analystenkommentare zum Steuerelement (für die Kundensteuerungsverwaltung).
state
Zeichenfolge
Analystengesteuerte Einstellung für das Steuerelement. Mögliche Werte: Default, Ignored, ThirdParty, Reviewed
vendorInformation
SecurityVendorInformation
Komplexer Typ, der Details zum Sicherheitsprodukt-/Dienstanbieter, -anbieter und -unteranbieter enthält (z. B. vendor=Microsoft; provider=SecureScore;). Anbieter- und Lieferantenfelder sind erforderlich.
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben.
Wenn der optionale Anforderungsheader verwendet wird, gibt die Methode einen 200 OK Antwortcode und das aktualisierte secureScoreControlProfiles-Objekt im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//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)
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Es folgt ein Beispiel für eine erfolgreiche Antwort.
HTTP/1.1 204 No Content
Anforderung
Das folgende Beispiel zeigt eine Anforderung, die den Anforderungsheader Prefer enthält.
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//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)
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
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
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Es folgt ein Beispiel für die Antwort, wenn der optionale Prefer: return=representation Anforderungsheader verwendet wird.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
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"
}
}