Los Id. de suscripción que devuelve el servidor se deben tratar como cadenas opacas. El cliente no debe intentar analizar ni hacer suposiciones sobre estos identificadores de recursos.
En el futuro, los resultados de la pertenencia pueden incluir usuarios de varios inquilinos, como se indica en la respuesta. Los clientes deben evitar suponer que todos los miembros pertenecen exclusivamente al inquilino actual.
Nota:
Esta API devuelve un error 401 cuando un inquilino recién creado llama a este método. Para obtener más información, vea Problemas conocidos.
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.
Este método admite los $filterparámetros de consulta , $selecty $top OData para ayudar a personalizar la respuesta. Los tamaños de página predeterminado y máximo son 100 y 999 objetos, respectivamente.
No proporcione un cuerpo de solicitud para este método.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 200 OK y una colección de objetos conversationMember en el cuerpo de la respuesta.
Ejemplos
Ejemplo 1: obtener la lista de miembros en el equipo.
GET https://graph.microsoft.com/v1.0/teams/ee0f5ae2-8bc6-4ae5-8466-7daeebbfa062/members
// 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
var result = await graphClient.Teams["{team-id}"].Members.GetAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
members, err := graphClient.Teams().ByTeamId("team-id").Members().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConversationMemberCollectionResponse result = graphClient.teams().byTeamId("{team-id}").members().get();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.teams.by_team_id('team-id').members.get()
GET https://graph.microsoft.com/v1.0/teams/ee0f5ae2-8bc6-4ae5-8466-7daeebbfa062/members?$filter=(microsoft.graph.aadUserConversationMember/userId eq '73761f06-2ac9-469c-9f10-279a8cc267f9')
// 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
var result = await graphClient.Teams["{team-id}"].Members.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "(microsoft.graph.aadUserConversationMember/userId eq '73761f06-2ac9-469c-9f10-279a8cc267f9')";
});
// 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"
graphteams "github.com/microsoftgraph/msgraph-sdk-go/teams"
//other-imports
)
requestFilter := "(microsoft.graph.aadUserConversationMember/userId eq '73761f06-2ac9-469c-9f10-279a8cc267f9')"
requestParameters := &graphteams.TeamItemMembersRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphteams.TeamItemMembersRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
members, err := graphClient.Teams().ByTeamId("team-id").Members().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConversationMemberCollectionResponse result = graphClient.teams().byTeamId("{team-id}").members().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "(microsoft.graph.aadUserConversationMember/userId eq '73761f06-2ac9-469c-9f10-279a8cc267f9')";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.teams.item.members.members_request_builder import MembersRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = MembersRequestBuilder.MembersRequestBuilderGetQueryParameters(
filter = "(microsoft.graph.aadUserConversationMember/userId eq '73761f06-2ac9-469c-9f10-279a8cc267f9')",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.teams.by_team_id('team-id').members.get(request_configuration = request_configuration)
Ejemplo 3: encontrar miembros de un equipo por sus nombres o correos electrónicos
En el ejemplo siguiente se muestra una solicitud para buscar los recursos de suscripción basándose en displayName o email del aadUserConversationMember.
GET https://graph.microsoft.com/v1.0/teams/ee0f5ae2-8bc6-4ae5-8466-7daeebbfa062/members?$filter=(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')
// 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
var result = await graphClient.Teams["{team-id}"].Members.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')";
});
mgc teams members list --team-id {team-id} --filter "(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')"
// 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"
graphteams "github.com/microsoftgraph/msgraph-sdk-go/teams"
//other-imports
)
requestFilter := "(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')"
requestParameters := &graphteams.TeamItemMembersRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphteams.TeamItemMembersRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
members, err := graphClient.Teams().ByTeamId("team-id").Members().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConversationMemberCollectionResponse result = graphClient.teams().byTeamId("{team-id}").members().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.teams.item.members.members_request_builder import MembersRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = MembersRequestBuilder.MembersRequestBuilderGetQueryParameters(
filter = "(microsoft.graph.aadUserConversationMember/displayName eq 'Harry Johnson' or microsoft.graph.aadUserConversationMember/email eq 'admin@contoso.com')",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.teams.by_team_id('team-id').members.get(request_configuration = request_configuration)