Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Publiez le browserSiteList spécifié pour les appareils à télécharger.
Dans le corps de la demande, omettez les deux sites et partagez les cookies pour publier la liste complète des sites. Si vous le souhaitez, vous pouvez publier des sites spécifiques et des cookies partagés en spécifiant une collection d’ID.
Propriété
Type
Description
Révision
Chaîne
Révision de la liste des sites à publier. Obligatoire.
POST https://graph.microsoft.com/beta/admin/edge/internetExplorerMode/siteLists/36ba61eb-c492-4283-a38b-963a1dbb2f69/publish
Content-Type: application/json
{
"revision": "1.0"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish;
var requestBody = new PublishPostRequestBody
{
Revision = "1.0",
};
// 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}"].Publish.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"
graphadmin "github.com/microsoftgraph/msgraph-beta-sdk-go/admin"
//other-imports
)
requestBody := graphadmin.NewPublishPostRequestBody()
revision := "1.0"
requestBody.SetRevision(&revision)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
publish, err := graphClient.Admin().Edge().InternetExplorerMode().SiteLists().ByBrowserSiteListId("browserSiteList-id").Publish().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.admin.edge.internetexplorermode.sitelists.item.publish.PublishPostRequestBody publishPostRequestBody = new com.microsoft.graph.beta.admin.edge.internetexplorermode.sitelists.item.publish.PublishPostRequestBody();
publishPostRequestBody.setRevision("1.0");
var result = graphClient.admin().edge().internetExplorerMode().siteLists().byBrowserSiteListId("{browserSiteList-id}").publish().post(publishPostRequestBody);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Admin\Edge\InternetExplorerMode\SiteLists\Item\Publish\PublishPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PublishPostRequestBody();
$requestBody->setRevision('1.0');
$result = $graphServiceClient->admin()->edge()->internetExplorerMode()->siteLists()->byBrowserSiteListId('browserSiteList-id')->publish()->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.admin.edge.internetexplorermode.sitelists.item.publish.publish_post_request_body import PublishPostRequestBody
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PublishPostRequestBody(
revision = "1.0",
)
result = await graph_client.admin.edge.internet_explorer_mode.site_lists.by_browser_site_list_id('browserSiteList-id').publish.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish;
using Microsoft.Graph.Beta.Models;
var requestBody = new PublishPostRequestBody
{
Revision = "1.0",
Sites = new List<BrowserSite>
{
new BrowserSite
{
Id = "53e5f971-fc7b-4cd3-a1bf-34d7c0416882",
},
new BrowserSite
{
Id = "2e27cc86-3662-447e-b751-274fb9f869ea",
},
},
SharedCookies = new List<BrowserSharedCookie>
{
new BrowserSharedCookie
{
Id = "7f639835-23ab-4793-b1e6-1a06fad127a2",
},
},
};
// 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}"].Publish.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.admin.edge.internetexplorermode.sitelists.item.publish.PublishPostRequestBody publishPostRequestBody = new com.microsoft.graph.beta.admin.edge.internetexplorermode.sitelists.item.publish.PublishPostRequestBody();
publishPostRequestBody.setRevision("1.0");
LinkedList<BrowserSite> sites = new LinkedList<BrowserSite>();
BrowserSite browserSite = new BrowserSite();
browserSite.setId("53e5f971-fc7b-4cd3-a1bf-34d7c0416882");
sites.add(browserSite);
BrowserSite browserSite1 = new BrowserSite();
browserSite1.setId("2e27cc86-3662-447e-b751-274fb9f869ea");
sites.add(browserSite1);
publishPostRequestBody.setSites(sites);
LinkedList<BrowserSharedCookie> sharedCookies = new LinkedList<BrowserSharedCookie>();
BrowserSharedCookie browserSharedCookie = new BrowserSharedCookie();
browserSharedCookie.setId("7f639835-23ab-4793-b1e6-1a06fad127a2");
sharedCookies.add(browserSharedCookie);
publishPostRequestBody.setSharedCookies(sharedCookies);
var result = graphClient.admin().edge().internetExplorerMode().siteLists().byBrowserSiteListId("{browserSiteList-id}").publish().post(publishPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.admin.edge.internetexplorermode.sitelists.item.publish.publish_post_request_body import PublishPostRequestBody
from msgraph_beta.generated.models.browser_site import BrowserSite
from msgraph_beta.generated.models.browser_shared_cookie import BrowserSharedCookie
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PublishPostRequestBody(
revision = "1.0",
sites = [
BrowserSite(
id = "53e5f971-fc7b-4cd3-a1bf-34d7c0416882",
),
BrowserSite(
id = "2e27cc86-3662-447e-b751-274fb9f869ea",
),
],
shared_cookies = [
BrowserSharedCookie(
id = "7f639835-23ab-4793-b1e6-1a06fad127a2",
),
],
)
result = await graph_client.admin.edge.internet_explorer_mode.site_lists.by_browser_site_list_id('browserSiteList-id').publish.post(request_body)
L’exemple suivant illustre la réponse. Le status indique pending si la requête contient des sites ou des cookies partagés que vous n’avez pas encore publiés.
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.browserSiteList",
"id": "36ba61eb-c492-4283-a38b-963a1dbb2f69",
"revision": "1.0",
"displayName": "Product Site List A",
"description": "A production site list for team A",
"lastModifiedDateTime": "2022-06-28T19:29:52.8752365Z",
"publishedDateTime": "2022-06-28T19:29:52.8752365Z",
"status": "pending",
"lastModifiedBy": {
"user": {
"id": "f6ff107e-bc40-4918-a432-8d7b60030a7c",
"displayName": "Joe Smith"
},
"application": null
},
"publishedBy": {
"user": {
"id": "f6ff107e-bc40-4918-a432-8d7b60030a7c",
"displayName": "Joe Smith"
},
"application": null
}
}