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.
Lösen Sie eine Cloud-PC-organization Aktion aus.
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) |
CloudPC.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Nicht unterstützt |
Nicht unterstützt |
HTTP-Anforderung
So lösen Sie eine Cloud-PC-organization Aktion mit delegierter Berechtigung aus:
POST /deviceManagement/virtualEndpoint/organizationAction
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung der Parameter an.
Die folgende Tabelle zeigt den Parameter, den Sie mit dieser Aktion verwenden können.
| Parameter |
Typ |
Beschreibung |
| actionType |
cloudPcOrganizationActionType |
Der Aktionstyp. Mögliche Werte sind: activate, deactivate und unknownFutureValue. Erforderlich. |
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 200 OK Antwortcode und ein cloudPcOrganizationActionDetail-Objekt im Antworttext zurück.
Beispiel
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/organizationAction
Content-Type: application/json
{
"actionType": "activate"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.OrganizationAction;
using Microsoft.Graph.Beta.Models;
var requestBody = new OrganizationActionPostRequestBody
{
ActionType = CloudPcOrganizationActionType.Activate,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.VirtualEndpoint.OrganizationAction.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"
graphdevicemanagement "github.com/microsoftgraph/msgraph-beta-sdk-go/devicemanagement"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphdevicemanagement.NewOrganizationActionPostRequestBody()
actionType := graphmodels.ACTIVATE_CLOUDPCORGANIZATIONACTIONTYPE
requestBody.SetActionType(&actionType)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
organizationAction, err := graphClient.DeviceManagement().VirtualEndpoint().OrganizationAction().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.devicemanagement.virtualendpoint.organizationaction.OrganizationActionPostRequestBody organizationActionPostRequestBody = new com.microsoft.graph.beta.devicemanagement.virtualendpoint.organizationaction.OrganizationActionPostRequestBody();
organizationActionPostRequestBody.setActionType(CloudPcOrganizationActionType.Activate);
var result = graphClient.deviceManagement().virtualEndpoint().organizationAction().post(organizationActionPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const cloudPcOrganizationActionDetail = {
actionType: 'activate'
};
await client.api('/deviceManagement/virtualEndpoint/organizationAction')
.version('beta')
.post(cloudPcOrganizationActionDetail);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\DeviceManagement\VirtualEndpoint\OrganizationAction\OrganizationActionPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\CloudPcOrganizationActionType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OrganizationActionPostRequestBody();
$requestBody->setActionType(new CloudPcOrganizationActionType('activate'));
$result = $graphServiceClient->deviceManagement()->virtualEndpoint()->organizationAction()->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.devicemanagement.virtualendpoint.organization_action.organization_action_post_request_body import OrganizationActionPostRequestBody
from msgraph_beta.generated.models.cloud_pc_organization_action_type import CloudPcOrganizationActionType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OrganizationActionPostRequestBody(
action_type = CloudPcOrganizationActionType.Activate,
)
result = await graph_client.device_management.virtual_endpoint.organization_action.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.cloudPcOrganizationActionDetail",
"actionType": "activate",
"status": "inProgress",
"errorDescription": null
}