Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
En el cuerpo de la solicitud, proporcione un objeto JSON con los siguientes parámetros.
Parámetro
Tipo
Descripción
groupId
Cadena
Identificador del grupo que se va a quitar de la directiva.
Respuesta
Si se ejecuta correctamente, este método devuelve el código de respuesta 200 OK. Si el grupo se quita de la directiva, se devuelve un true valor en el cuerpo de la respuesta. De lo contrario, se devuelve un false valor en el cuerpo de la respuesta.
POST https://graph.microsoft.com/v1.0/groupLifecyclePolicies/{id}/removeGroup
Content-type: application/json
{
"groupId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.GroupLifecyclePolicies.Item.RemoveGroup;
var requestBody = new RemoveGroupPostRequestBody
{
GroupId = "ffffffff-ffff-ffff-ffff-ffffffffffff",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.GroupLifecyclePolicies["{groupLifecyclePolicy-id}"].RemoveGroup.PostAsRemoveGroupPostResponseAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphgrouplifecyclepolicies "github.com/microsoftgraph/msgraph-sdk-go/grouplifecyclepolicies"
//other-imports
)
requestBody := graphgrouplifecyclepolicies.NewRemoveGroupPostRequestBody()
groupId := "ffffffff-ffff-ffff-ffff-ffffffffffff"
requestBody.SetGroupId(&groupId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
removeGroup, err := graphClient.GroupLifecyclePolicies().ByGroupLifecyclePolicyId("groupLifecyclePolicy-id").RemoveGroup().PostAsRemoveGroupPostResponse(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.grouplifecyclepolicies.item.removegroup.RemoveGroupPostRequestBody removeGroupPostRequestBody = new com.microsoft.graph.grouplifecyclepolicies.item.removegroup.RemoveGroupPostRequestBody();
removeGroupPostRequestBody.setGroupId("ffffffff-ffff-ffff-ffff-ffffffffffff");
var result = graphClient.groupLifecyclePolicies().byGroupLifecyclePolicyId("{groupLifecyclePolicy-id}").removeGroup().post(removeGroupPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\GroupLifecyclePolicies\Item\RemoveGroup\RemoveGroupPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RemoveGroupPostRequestBody();
$requestBody->setGroupId('ffffffff-ffff-ffff-ffff-ffffffffffff');
$result = $graphServiceClient->groupLifecyclePolicies()->byGroupLifecyclePolicyId('groupLifecyclePolicy-id')->removeGroup()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.grouplifecyclepolicies.item.remove_group.remove_group_post_request_body import RemoveGroupPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RemoveGroupPostRequestBody(
group_id = "ffffffff-ffff-ffff-ffff-ffffffffffff",
)
result = await graph_client.group_lifecycle_policies.by_group_lifecycle_policy_id('groupLifecyclePolicy-id').remove_group.post(request_body)