PATCH https://graph.microsoft.com/beta/admin/edge/internetExplorerMode/siteLists/972a5778-df43-45fd-9c2a-5dd944c7a1ce/sites/7cf831d2-8a9b-4826-b120-911566f6fd6a
Content-Type: application/json
Content-length: 387
{
"webUrl": "www.microsoft.com",
"targetEnvironment": "microsoftEdge",
"mergeType": "default",
"compatibilityMode": "default",
"allowRedirect": false,
"comment": "Updating to Edge."
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new BrowserSite
{
WebUrl = "www.microsoft.com",
TargetEnvironment = BrowserSiteTargetEnvironment.MicrosoftEdge,
MergeType = BrowserSiteMergeType.Default,
CompatibilityMode = BrowserSiteCompatibilityMode.Default,
AllowRedirect = false,
Comment = "Updating to Edge.",
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Admin.Edge.InternetExplorerMode.SiteLists["{browserSiteList-id}"].Sites["{browserSite-id}"].PatchAsync(requestBody);
mgc-beta admin edge internet-explorer-mode site-lists sites patch --browser-site-list-id {browserSiteList-id} --browser-site-id {browserSite-id} --body '{\
"webUrl": "www.microsoft.com",\
"targetEnvironment": "microsoftEdge",\
"mergeType": "default",\
"compatibilityMode": "default",\
"allowRedirect": false,\
"comment": "Updating to Edge."\
}\
'
// 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.NewBrowserSite()
webUrl := "www.microsoft.com"
requestBody.SetWebUrl(&webUrl)
targetEnvironment := graphmodels.MICROSOFTEDGE_BROWSERSITETARGETENVIRONMENT
requestBody.SetTargetEnvironment(&targetEnvironment)
mergeType := graphmodels.DEFAULT_BROWSERSITEMERGETYPE
requestBody.SetMergeType(&mergeType)
compatibilityMode := graphmodels.DEFAULT_BROWSERSITECOMPATIBILITYMODE
requestBody.SetCompatibilityMode(&compatibilityMode)
allowRedirect := false
requestBody.SetAllowRedirect(&allowRedirect)
comment := "Updating to Edge."
requestBody.SetComment(&comment)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
sites, err := graphClient.Admin().Edge().InternetExplorerMode().SiteLists().ByBrowserSiteListId("browserSiteList-id").Sites().ByBrowserSiteId("browserSite-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BrowserSite browserSite = new BrowserSite();
browserSite.setWebUrl("www.microsoft.com");
browserSite.setTargetEnvironment(BrowserSiteTargetEnvironment.MicrosoftEdge);
browserSite.setMergeType(BrowserSiteMergeType.Default);
browserSite.setCompatibilityMode(BrowserSiteCompatibilityMode.Default);
browserSite.setAllowRedirect(false);
browserSite.setComment("Updating to Edge.");
BrowserSite result = graphClient.admin().edge().internetExplorerMode().siteLists().byBrowserSiteListId("{browserSiteList-id}").sites().byBrowserSiteId("{browserSite-id}").patch(browserSite);
const options = {
authProvider,
};
const client = Client.init(options);
const browserSite = {
webUrl: 'www.microsoft.com',
targetEnvironment: 'microsoftEdge',
mergeType: 'default',
compatibilityMode: 'default',
allowRedirect: false,
comment: 'Updating to Edge.'
};
await client.api('/admin/edge/internetExplorerMode/siteLists/972a5778-df43-45fd-9c2a-5dd944c7a1ce/sites/7cf831d2-8a9b-4826-b120-911566f6fd6a')
.version('beta')
.update(browserSite);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\BrowserSite;
use Microsoft\Graph\Beta\Generated\Models\BrowserSiteTargetEnvironment;
use Microsoft\Graph\Beta\Generated\Models\BrowserSiteMergeType;
use Microsoft\Graph\Beta\Generated\Models\BrowserSiteCompatibilityMode;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BrowserSite();
$requestBody->setWebUrl('www.microsoft.com');
$requestBody->setTargetEnvironment(new BrowserSiteTargetEnvironment('microsoftEdge'));
$requestBody->setMergeType(new BrowserSiteMergeType('default'));
$requestBody->setCompatibilityMode(new BrowserSiteCompatibilityMode('default'));
$requestBody->setAllowRedirect(false);
$requestBody->setComment('Updating to Edge.');
$result = $graphServiceClient->admin()->edge()->internetExplorerMode()->siteLists()->byBrowserSiteListId('browserSiteList-id')->sites()->byBrowserSiteId('browserSite-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.DeviceManagement
$params = @{
webUrl = "www.microsoft.com"
targetEnvironment = "microsoftEdge"
mergeType = "default"
compatibilityMode = "default"
allowRedirect = $false
comment = "Updating to Edge."
}
Update-MgBetaAdminEdgeInternetExplorerModeSiteListSite -BrowserSiteListId $browserSiteListId -BrowserSiteId $browserSiteId -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.browser_site import BrowserSite
from msgraph_beta.generated.models.browser_site_target_environment import BrowserSiteTargetEnvironment
from msgraph_beta.generated.models.browser_site_merge_type import BrowserSiteMergeType
from msgraph_beta.generated.models.browser_site_compatibility_mode import BrowserSiteCompatibilityMode
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BrowserSite(
web_url = "www.microsoft.com",
target_environment = BrowserSiteTargetEnvironment.MicrosoftEdge,
merge_type = BrowserSiteMergeType.Default,
compatibility_mode = BrowserSiteCompatibilityMode.Default,
allow_redirect = False,
comment = "Updating to Edge.",
)
result = await graph_client.admin.edge.internet_explorer_mode.site_lists.by_browser_site_list_id('browserSiteList-id').sites.by_browser_site_id('browserSite-id').patch(request_body)