// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Networkaccess;
var requestBody = new ConditionalAccessSettings
{
SignalingStatus = Status.Disabled,
AdditionalData = new Dictionary<string, object>
{
{
"@odata.context" , "https://graph.microsoft.com/beta/networkAccess/settings/$metadata#conditionalAccess"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.NetworkAccess.Settings.ConditionalAccess.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"
graphmodelsnetworkaccess "github.com/microsoftgraph/msgraph-beta-sdk-go/models/networkaccess"
//other-imports
)
requestBody := graphmodelsnetworkaccess.NewConditionalAccessSettings()
signalingStatus := graphmodels.DISABLED_STATUS
requestBody.SetSignalingStatus(&signalingStatus)
additionalData := map[string]interface{}{
"@odata.context" : "https://graph.microsoft.com/beta/networkAccess/settings/$metadata#conditionalAccess",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
conditionalAccess, err := graphClient.NetworkAccess().Settings().ConditionalAccess().Patch(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.ConditionalAccessSettings conditionalAccessSettings = new com.microsoft.graph.beta.models.networkaccess.ConditionalAccessSettings();
conditionalAccessSettings.setSignalingStatus(com.microsoft.graph.beta.models.networkaccess.Status.Disabled);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.context", "https://graph.microsoft.com/beta/networkAccess/settings/$metadata#conditionalAccess");
conditionalAccessSettings.setAdditionalData(additionalData);
com.microsoft.graph.models.networkaccess.ConditionalAccessSettings result = graphClient.networkAccess().settings().conditionalAccess().patch(conditionalAccessSettings);
# 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.conditional_access_settings import ConditionalAccessSettings
from msgraph_beta.generated.models.status import Status
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ConditionalAccessSettings(
signaling_status = Status.Disabled,
additional_data = {
"@odata_context" : "https://graph.microsoft.com/beta/networkAccess/settings/$metadata#conditionalAccess",
}
)
result = await graph_client.network_access.settings.conditional_access.patch(request_body)