Namespace: microsoft.graph
Importante
As APIs na versão /beta no Microsoft Graph estão sujeitas a alterações. Não há suporte para o uso dessas APIs em aplicativos de produção. Para determinar se uma API está disponível na v1.0, use o seletor Versão.
Solucionar problemas de um PC na nuvem específico. Use essa API para marcar o status de integridade do PC na nuvem e do host da sessão.
Essa API está disponível nas seguintes implantações de nuvem nacional.
| Serviço global |
Governo dos EUA L4 |
US Government L5 (DOD) |
China operada pela 21Vianet |
| ✅ |
✅ |
❌ |
❌ |
Permissões
Escolha a(s) permissão(s) marcada(s) como menos privilegiada(s) para essa API. Use uma permissão ou permissões com privilégios mais altos somente se o aplicativo exigir. Para obter detalhes sobre permissões delegadas e de aplicativo, consulte Tipos de permissão. Para saber mais sobre essas permissões, consulte a referência de permissões.
| Tipo de permissão |
Permissões menos privilegiadas |
Permissões com privilégios mais elevados |
| Delegado (conta corporativa ou de estudante) |
CloudPC.ReadWrite.All |
Indisponível. |
| Delegado (conta pessoal da Microsoft) |
Sem suporte. |
Sem suporte. |
| Application |
CloudPC.ReadWrite.All |
Indisponível. |
Solicitação HTTP
Para solucionar problemas do cloudPC do usuário especificado (que é o usuário conectado) na organização usando a permissão delegada:
POST /me/cloudPCs/{cloudPCId}/troubleshoot
POST /users/{userId}/cloudPCs/{cloudPCId}/troubleshoot
Para solucionar problemas do cloudPC especificado na organização, usando a permissão delegada (o usuário conectado deve ser o administrador) ou a permissão do aplicativo:
POST /deviceManagement/virtualEndpoint/cloudPCs/{cloudPCId}/troubleshoot
Corpo da solicitação
Não forneça um corpo de solicitação para esse método.
Resposta
Se tiver êxito, este método retornará um código de resposta 204 No Content.
Exemplos
Solicitação
POST https://graph.microsoft.com/beta/deviceManagement/virtualEndpoint/cloudPCs/ff4eb6ab-d56a-4edf-90c1-baaec8dd6032/troubleshoot
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.VirtualEndpoint.CloudPCs["{cloudPC-id}"].Troubleshoot.PostAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.DeviceManagement().VirtualEndpoint().CloudPCs().ByCloudPCId("cloudPC-id").Troubleshoot().Post(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.deviceManagement().virtualEndpoint().cloudPCs().byCloudPCId("{cloudPC-id}").troubleshoot().post();
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/deviceManagement/virtualEndpoint/cloudPCs/ff4eb6ab-d56a-4edf-90c1-baaec8dd6032/troubleshoot')
.version('beta')
.post();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->deviceManagement()->virtualEndpoint()->cloudPCs()->byCloudPCId('cloudPC-id')->troubleshoot()->post()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.device_management.virtual_endpoint.cloud_p_cs.by_cloud_p_c_id('cloudPC-id').troubleshoot.post()
Resposta
HTTP/1.1 204 No Content
Exemplo 2: solucionar problemas do cloudPC para o usuário conectado
Solicitação
POST https://graph.microsoft.com/beta/me/cloudPCs/36bd4942-0ca8-11ed-861d-0242ac120002/troubleshoot
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.CloudPCs["{cloudPC-id}"].Troubleshoot.PostAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Me().CloudPCs().ByCloudPCId("cloudPC-id").Troubleshoot().Post(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.me().cloudPCs().byCloudPCId("{cloudPC-id}").troubleshoot().post();
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/me/cloudPCs/36bd4942-0ca8-11ed-861d-0242ac120002/troubleshoot')
.version('beta')
.post();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->me()->cloudPCs()->byCloudPCId('cloudPC-id')->troubleshoot()->post()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.me.cloud_p_cs.by_cloud_p_c_id('cloudPC-id').troubleshoot.post()
Resposta
HTTP/1.1 204 No Content