Namespace: microsoft.graph
Aktualisieren Sie ein bearbeitbares secureScoreControlProfile-Objekt in einer integrierten Lösung, um verschiedene Eigenschaften wie tenantNote zu ändern.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
SecurityEvents.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
SecurityEvents.ReadWrite.All |
Nicht verfügbar. |
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 Text muss die vendorInformation -Eigenschaft mit gültigen provider Feldern und vendor enthalten. In der folgenden Tabelle sind die Felder aufgeführt, die für ein secureScoreControlProfile 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 |
| vendorInformation |
SecurityVendorInformation |
Komplexer Typ mit Details zum Sicherheitsprodukt/Serviceanbieter, Anbieter und Unteranbieter (z. B. vendor=Microsoft; provider=SecureScore;).
Anbieter- und Anbieterfelder sind erforderlich. |
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben.
Wenn der optionale Prefer: return=representation Anforderungsheader verwendet wird, gibt die Methode einen 200 OK Antwortcode und das aktualisierte secureScoreControlProfiles-Objekt im Antworttext zurück.
Beispiel
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/v1.0/security/secureScoreControlProfiles/NonOwnerAccess
Content-type: application/json
{
"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",
},
};
// 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);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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)
// 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)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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);
SecureScoreControlProfile result = graphClient.security().secureScoreControlProfiles().bySecureScoreControlProfileId("{secureScoreControlProfile-id}").patch(secureScoreControlProfile);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const secureScoreControlProfile = {
vendorInformation: {
provider: 'SecureScore',
providerVersion: null,
subProvider: null,
vendor: 'Microsoft'
}
};
await client.api('/security/secureScoreControlProfiles/NonOwnerAccess')
.update(secureScoreControlProfile);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?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);
$result = $graphServiceClient->security()->secureScoreControlProfiles()->bySecureScoreControlProfileId('secureScoreControlProfile-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Security
$params = @{
vendorInformation = @{
provider = "SecureScore"
providerVersion = $null
subProvider = $null
vendor = "Microsoft"
}
}
Update-MgSecuritySecureScoreControlProfile -SecureScoreControlProfileId $secureScoreControlProfileId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.secure_score_control_profile import SecureScoreControlProfile
from msgraph.generated.models.security_vendor_information import SecurityVendorInformation
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SecureScoreControlProfile(
vendor_information = SecurityVendorInformation(
provider = "SecureScore",
provider_version = None,
sub_provider = None,
vendor = "Microsoft",
),
)
result = await graph_client.security.secure_score_control_profiles.by_secure_score_control_profile_id('secureScoreControlProfile-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, 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
Prefer: return=representation
{
"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",
},
};
// 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);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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)
// 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)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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);
SecureScoreControlProfile result = graphClient.security().secureScoreControlProfiles().bySecureScoreControlProfileId("{secureScoreControlProfile-id}").patch(secureScoreControlProfile);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const secureScoreControlProfile = {
vendorInformation: {
provider: 'SecureScore',
providerVersion: null,
subProvider: null,
vendor: 'Microsoft'
}
};
await client.api('/security/secureScoreControlProfiles/NonOwnerAccess')
.update(secureScoreControlProfile);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?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);
$result = $graphServiceClient->security()->secureScoreControlProfiles()->bySecureScoreControlProfileId('secureScoreControlProfile-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Security
$params = @{
vendorInformation = @{
provider = "SecureScore"
providerVersion = $null
subProvider = $null
vendor = "Microsoft"
}
}
Update-MgSecuritySecureScoreControlProfile -SecureScoreControlProfileId $secureScoreControlProfileId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.secure_score_control_profile import SecureScoreControlProfile
from msgraph.generated.models.security_vendor_information import SecurityVendorInformation
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SecureScoreControlProfile(
vendor_information = SecurityVendorInformation(
provider = "SecureScore",
provider_version = None,
sub_provider = None,
vendor = "Microsoft",
),
)
result = await graph_client.security.secure_score_control_profiles.by_secure_score_control_profile_id('secureScoreControlProfile-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, 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": null,
"controlStateUpdates": [
{
"updatedBy": "user1@contoso.com",
"updatedDateTime": "2019-03-19T22:37:14.628799Z"
}
],
"vendorInformation": {
"provider": "SecureScore",
"providerVersion": null,
"subProvider": null,
"vendor": "Microsoft"
}
}