Namespace: microsoft.graph.networkaccess
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.
Erstellen Sie ein neues tlsInspectionPolicy-Objekt .
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) |
NetworkAccess.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
NetworkAccess.ReadWrite.All |
Nicht verfügbar. |
Wichtig
In delegierten Szenarien mit Geschäfts-, Schul- oder Unikonten muss dem angemeldeten Benutzer eine unterstützte Microsoft Entra Rolle oder eine benutzerdefinierte Rolle mit einer unterstützten Rollenberechtigung zugewiesen werden. Die folgenden Rollen mit den geringsten Berechtigungen werden für diesen Vorgang unterstützt.
- Globaler Administrator für sicheren Zugriff
- Sicherheitsadministrator
HTTP-Anforderung
POST /networkAccess/tlsInspectionPolicies
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des tlsInspectionPolicy-Objekts an.
Sie können die folgenden Eigenschaften angeben, wenn Sie eine tlsInspectionPolicy erstellen.
| Eigenschaft |
Typ |
Beschreibung |
| description |
Zeichenfolge |
Optionale Beschreibung der Richtlinie. |
| name |
Zeichenfolge |
Der Anzeigename der Richtlinie. Erforderlich. |
| settings |
microsoft.graph.networkaccess.tlsInspectionPolicySettings |
Einstellungen, die das Standardverhalten der Richtlinie konfigurieren. Erforderlich. |
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 201 Created Antwortcode und ein tlsInspectionPolicy-Objekt im Antworttext zurück.
Beispiele
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/networkAccess/tlsInspectionPolicies
Content-Type: application/json
{
"name": "Default TLS Inspection Policy",
"description": "Policy for inspecting TLS traffic",
"settings": {
"defaultAction": "bypass"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Networkaccess;
var requestBody = new TlsInspectionPolicy
{
Name = "Default TLS Inspection Policy",
Description = "Policy for inspecting TLS traffic",
Settings = new TlsInspectionPolicySettings
{
AdditionalData = new Dictionary<string, object>
{
{
"defaultAction" , "bypass"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.NetworkAccess.TlsInspectionPolicies.PostAsync(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"
graphmodelsnetworkaccess "github.com/microsoftgraph/msgraph-beta-sdk-go/models/networkaccess"
//other-imports
)
requestBody := graphmodelsnetworkaccess.NewTlsInspectionPolicy()
name := "Default TLS Inspection Policy"
requestBody.SetName(&name)
description := "Policy for inspecting TLS traffic"
requestBody.SetDescription(&description)
settings := graphmodelsnetworkaccess.NewTlsInspectionPolicySettings()
additionalData := map[string]interface{}{
"defaultAction" : "bypass",
}
settings.SetAdditionalData(additionalData)
requestBody.SetSettings(settings)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
tlsInspectionPolicies, err := graphClient.NetworkAccess().TlsInspectionPolicies().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.networkaccess.TlsInspectionPolicy tlsInspectionPolicy = new com.microsoft.graph.beta.models.networkaccess.TlsInspectionPolicy();
tlsInspectionPolicy.setName("Default TLS Inspection Policy");
tlsInspectionPolicy.setDescription("Policy for inspecting TLS traffic");
com.microsoft.graph.beta.models.networkaccess.TlsInspectionPolicySettings settings = new com.microsoft.graph.beta.models.networkaccess.TlsInspectionPolicySettings();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("defaultAction", "bypass");
settings.setAdditionalData(additionalData);
tlsInspectionPolicy.setSettings(settings);
com.microsoft.graph.models.networkaccess.TlsInspectionPolicy result = graphClient.networkAccess().tlsInspectionPolicies().post(tlsInspectionPolicy);
const options = {
authProvider,
};
const client = Client.init(options);
const tlsInspectionPolicy = {
name: 'Default TLS Inspection Policy',
description: 'Policy for inspecting TLS traffic',
settings: {
defaultAction: 'bypass'
}
};
await client.api('/networkAccess/tlsInspectionPolicies')
.version('beta')
.post(tlsInspectionPolicy);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Networkaccess\TlsInspectionPolicy;
use Microsoft\Graph\Beta\Generated\Models\Networkaccess\TlsInspectionPolicySettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TlsInspectionPolicy();
$requestBody->setName('Default TLS Inspection Policy');
$requestBody->setDescription('Policy for inspecting TLS traffic');
$settings = new TlsInspectionPolicySettings();
$additionalData = [
'defaultAction' => 'bypass',
];
$settings->setAdditionalData($additionalData);
$requestBody->setSettings($settings);
$result = $graphServiceClient->networkAccess()->tlsInspectionPolicies()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.networkaccess.tls_inspection_policy import TlsInspectionPolicy
from msgraph_beta.generated.models.networkaccess.tls_inspection_policy_settings import TlsInspectionPolicySettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TlsInspectionPolicy(
name = "Default TLS Inspection Policy",
description = "Policy for inspecting TLS traffic",
settings = TlsInspectionPolicySettings(
additional_data = {
"default_action" : "bypass",
}
),
)
result = await graph_client.network_access.tls_inspection_policies.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#networkAccess/tlsInspectionPolicies/$entity",
"id": "b712c469-e7cd-e7cb-738f-94b199570b0d",
"name": "Default TLS Inspection Policy",
"description": "Policy for inspecting TLS traffic",
"version": "1.0.0",
"lastModifiedDateTime": "2025-06-02T20:54:19.146638Z",
"settings": {
"defaultAction": "bypass"
}
}