Namespace: microsoft.graph
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Aktualisieren der Datenschutzeinstellungen, um den angegebenen Typ von insightsSettings in einer organization anzuzeigen oder zurückzugeben. Die Art der Einstellungen kann Kontaktdaten, Elementinformationen oder Personeninformationen sein.
Weitere Informationen zum Anpassen des Datenschutzes von Insights für Ihre Organization finden Sie unter:
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
✅ |
✅ |
✅ |
Berechtigungen
In den folgenden Tabellen sind die Berechtigungen mit den geringsten Berechtigungen aufgeführt, die zum Aufrufen dieser API für jeden unterstützten Ressourcentyp erforderlich sind. Befolgen Sie die bewährten Methoden , um Berechtigungen mit den geringsten Berechtigungen anzufordern. 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) |
Organization.ReadWrite.All |
AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, User.ReadWrite.All |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Organization.ReadWrite.All |
Nicht verfügbar. |
So aktualisieren Sie die Einstellungen für Elementeinblicke für eine organization
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
PeopleSettings.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
PeopleSettings.ReadWrite.All |
Nicht verfügbar. |
So aktualisieren Sie die Einstellungen von People Insights für eine organization
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
Organization.ReadWrite.All |
AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, User.ReadWrite.All |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Nicht unterstützt |
Nicht unterstützt |
Hinweis: Wenn Sie delegierte Berechtigungen für diesen Vorgang verwenden, um Insights für Kontakte, Elemente oder Personen zu aktualisieren, muss der angemeldete Benutzer über die Rolle "Globaler Administrator" verfügen.
HTTP-Anforderung
So aktualisieren Sie die Einstellungen für Kontakteinblicke:
PATCH /organization/{organizationId}/settings/contactInsights
So aktualisieren Sie die Einstellungen für Elementeinblicke:
PATCH /admin/people/itemInsights
So aktualisieren Sie die Einstellungen für Personeneinblicke:
PATCH /organization/{organizationId}/settings/peopleInsights
Anforderungstext
Geben Sie im Anforderungstext nur die Werte für die zu aktualisierenden Eigenschaften an. Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte bei oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet.
In der folgenden Tabelle sind die Eigenschaften angegeben, die aktualisiert werden können.
| Eigenschaft |
Typ |
Beschreibung |
| disabledForGroup |
Zeichenfolge |
Die ID einer Microsoft Entra-Gruppe, deren Mitglieder über den angegebenen Erkenntnistyp verfügen. Der Standardwert ist empty. Optional. |
| isEnabledInOrganization |
Boolean |
trueWenn der angegebene Insight-Typ für die organization aktiviert ist; false wenn der angegebene Insight-Typ für alle Benutzer ohne Ausnahmen deaktiviert ist. Der Standardwert ist true. Optional. |
Hinweis: Dieser Vorgang überprüft den Wert der disabledForGroup-Eigenschaft nicht, wenn Sie ihn in den Anforderungstext einschließen. Wenn Sie die disabledForGroup-Eigenschaft auf eine Zeichenfolge festlegen, überprüft dieser Vorgang nicht die Existenz der entsprechenden Microsoft Entra-Gruppe. Das bedeutet, wenn Sie disabledForGroup auf eine Microsoft Entra-Gruppe festlegen, die nicht vorhanden ist oder danach gelöscht wird, kann dieser Vorgang keine Gruppenmitgliedschaft identifizieren und Element- oder Personenerkenntnisse für bestimmte Benutzer deaktivieren. Wenn isEnabledInOrganization festgelegt ist auf trueaktiviert, aktiviert der Vorgang den angegebenen Erkenntnistyp für alle Benutzer in der organization.
Antwort
Bei erfolgreicher Ausführung gibt diese Methode einen 200 OK Antwortcode und ein insightsSettings-Objekt im Antworttext zurück.
Beispiele
Anforderung
Das folgende Beispiel zeigt, wie ein Administrator die isEnabledInOrganization-Eigenschaft aktualisiert, um Kontakteinblicke für die angegebene organization zu aktivieren. Der Standardwert für isEnabledInOrganization ist falsedas Deaktivieren von Kontakteinblicken. Im Beispiel wird außerdem die Datenschutzeinstellung disabledForGroup so festgelegt, dass die Kontaktinformationen des Benutzers in einer bestimmten Microsoft Entra Gruppe nicht angezeigt werden.
PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/contactInsights
Content-type: application/json
{
"isEnabledInOrganization": true,
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new InsightsSettings
{
IsEnabledInOrganization = true,
DisabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Organization["{organization-id}"].Settings.ContactInsights.PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewInsightsSettings()
isEnabledInOrganization := true
requestBody.SetIsEnabledInOrganization(&isEnabledInOrganization)
disabledForGroup := "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
requestBody.SetDisabledForGroup(&disabledForGroup)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
contactInsights, err := graphClient.Organization().ByOrganizationId("organization-id").Settings().ContactInsights().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
InsightsSettings insightsSettings = new InsightsSettings();
insightsSettings.setIsEnabledInOrganization(true);
insightsSettings.setDisabledForGroup("edbfe4fb-ec70-4300-928f-dbb2ae86c981");
InsightsSettings result = graphClient.organization().byOrganizationId("{organization-id}").settings().contactInsights().patch(insightsSettings);
const options = {
authProvider,
};
const client = Client.init(options);
const insightsSettings = {
isEnabledInOrganization: true,
disabledForGroup: 'edbfe4fb-ec70-4300-928f-dbb2ae86c981'
};
await client.api('/organization/{organizationId}/settings/contactInsights')
.version('beta')
.update(insightsSettings);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\InsightsSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InsightsSettings();
$requestBody->setIsEnabledInOrganization(true);
$requestBody->setDisabledForGroup('edbfe4fb-ec70-4300-928f-dbb2ae86c981');
$result = $graphServiceClient->organization()->byOrganizationId('organization-id')->settings()->contactInsights()->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
$params = @{
isEnabledInOrganization = $true
disabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Update-MgBetaOrganizationSettingContactInsight -OrganizationId $organizationId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.insights_settings import InsightsSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = InsightsSettings(
is_enabled_in_organization = True,
disabled_for_group = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
)
result = await graph_client.organization.by_organization_id('organization-id').settings.contact_insights.patch(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"isEnabledInOrganization": true,
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Beispiel 2: Aktualisieren von Einstellungen für Item Insights
Anforderung
Das folgende Beispiel zeigt, wie ein Administrator die Datenschutzeinstellung disabledForGroup aktualisiert, um die Anzeige von Elementerkenntnissen von Benutzern in einer bestimmten Microsoft Entra-Gruppe zu unterbinden.
PATCH https://graph.microsoft.com/beta/admin/people/itemInsights
Content-type: application/json
{
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new InsightsSettings
{
DisabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Admin.People.ItemInsights.PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewInsightsSettings()
disabledForGroup := "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
requestBody.SetDisabledForGroup(&disabledForGroup)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
itemInsights, err := graphClient.Admin().People().ItemInsights().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
InsightsSettings insightsSettings = new InsightsSettings();
insightsSettings.setDisabledForGroup("edbfe4fb-ec70-4300-928f-dbb2ae86c981");
InsightsSettings result = graphClient.admin().people().itemInsights().patch(insightsSettings);
const options = {
authProvider,
};
const client = Client.init(options);
const insightsSettings = {
disabledForGroup: 'edbfe4fb-ec70-4300-928f-dbb2ae86c981'
};
await client.api('/admin/people/itemInsights')
.version('beta')
.update(insightsSettings);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\InsightsSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InsightsSettings();
$requestBody->setDisabledForGroup('edbfe4fb-ec70-4300-928f-dbb2ae86c981');
$result = $graphServiceClient->admin()->people()->itemInsights()->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
$params = @{
disabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Update-MgBetaAdminPeopleItemInsight -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.insights_settings import InsightsSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = InsightsSettings(
disabled_for_group = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
)
result = await graph_client.admin.people.item_insights.patch(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Beispiel 3: Aktualisieren von Einstellungen für People Insights
Anforderung
Das folgende Beispiel zeigt, wie ein Administrator die Datenschutzeinstellung disabledForGroup aktualisiert, um die Anzeige von Personenerkenntnissen von Benutzern in einer bestimmten Microsoft Entra-Gruppe zu unterbinden.
PATCH https://graph.microsoft.com/beta/organization/{organizationId}/settings/peopleInsights
Content-type: application/json
{
"isEnabledInOrganization": true,
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new InsightsSettings
{
IsEnabledInOrganization = true,
DisabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Organization["{organization-id}"].Settings.PeopleInsights.PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewInsightsSettings()
isEnabledInOrganization := true
requestBody.SetIsEnabledInOrganization(&isEnabledInOrganization)
disabledForGroup := "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
requestBody.SetDisabledForGroup(&disabledForGroup)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
peopleInsights, err := graphClient.Organization().ByOrganizationId("organization-id").Settings().PeopleInsights().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
InsightsSettings insightsSettings = new InsightsSettings();
insightsSettings.setIsEnabledInOrganization(true);
insightsSettings.setDisabledForGroup("edbfe4fb-ec70-4300-928f-dbb2ae86c981");
InsightsSettings result = graphClient.organization().byOrganizationId("{organization-id}").settings().peopleInsights().patch(insightsSettings);
const options = {
authProvider,
};
const client = Client.init(options);
const insightsSettings = {
isEnabledInOrganization: true,
disabledForGroup: 'edbfe4fb-ec70-4300-928f-dbb2ae86c981'
};
await client.api('/organization/{organizationId}/settings/peopleInsights')
.version('beta')
.update(insightsSettings);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\InsightsSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new InsightsSettings();
$requestBody->setIsEnabledInOrganization(true);
$requestBody->setDisabledForGroup('edbfe4fb-ec70-4300-928f-dbb2ae86c981');
$result = $graphServiceClient->organization()->byOrganizationId('organization-id')->settings()->peopleInsights()->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
$params = @{
isEnabledInOrganization = $true
disabledForGroup = "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}
Update-MgBetaOrganizationSettingPersonInsight -OrganizationId $organizationId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.insights_settings import InsightsSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = InsightsSettings(
is_enabled_in_organization = True,
disabled_for_group = "edbfe4fb-ec70-4300-928f-dbb2ae86c981",
)
result = await graph_client.organization.by_organization_id('organization-id').settings.people_insights.patch(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"isEnabledInOrganization": true,
"disabledForGroup": "edbfe4fb-ec70-4300-928f-dbb2ae86c981"
}