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.
Tipo de permiso
Permisos con privilegios mínimos
Permisos con privilegios más altos
Delegado (cuenta profesional o educativa)
CustomSecAttributeDefinition.Read.All
CustomSecAttributeDefinition.ReadWrite.All
Delegado (cuenta personal de Microsoft)
No admitida.
No admitida.
Aplicación
CustomSecAttributeDefinition.Read.All
CustomSecAttributeDefinition.ReadWrite.All
Importante
En escenarios delegados con cuentas profesionales o educativas, al usuario que ha iniciado sesión se le debe asignar un rol de Microsoft Entra compatible o un rol personalizado con un permiso de rol admitido. Se admiten los siguientes roles con privilegios para esta operación.
Lector de asignación de atributos
Lector de definición de atributos
Administrador de asignación de atributos
Administrador de definición de atributos
De forma predeterminada, el administrador global y otros roles de administrador no tienen permisos para leer, definir ni asignar atributos de seguridad personalizados.
Solicitud HTTP
GET /directory/attributeSets
Parámetros de consulta opcionales
Este método admite los $selectparámetros de consulta , $topy $orderby OData para ayudar a personalizar la respuesta. Para obtener información general, vea Parámetros de consulta OData.
GET https://graph.microsoft.com/v1.0/directory/attributeSets
// 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.Directory.AttributeSets.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
attributeSets, err := graphClient.Directory().AttributeSets().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AttributeSetCollectionResponse result = graphClient.directory().attributeSets().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.directory.attribute_sets.get()
GET https://graph.microsoft.com/v1.0/directory/attributeSets?$top=10
// 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.Directory.AttributeSets.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Top = 10;
});
// 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"
graphdirectory "github.com/microsoftgraph/msgraph-sdk-go/directory"
//other-imports
)
requestTop := int32(10)
requestParameters := &graphdirectory.DirectoryAttributeSetsRequestBuilderGetQueryParameters{
Top: &requestTop,
}
configuration := &graphdirectory.DirectoryAttributeSetsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
attributeSets, err := graphClient.Directory().AttributeSets().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AttributeSetCollectionResponse result = graphClient.directory().attributeSets().get(requestConfiguration -> {
requestConfiguration.queryParameters.top = 10;
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.directory.attribute_sets.attribute_sets_request_builder import AttributeSetsRequestBuilder
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 = AttributeSetsRequestBuilder.AttributeSetsRequestBuilderGetQueryParameters(
top = 10,
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.directory.attribute_sets.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/v1.0/directory/attributeSets?$orderby=id
// 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.Directory.AttributeSets.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Orderby = new string []{ "id" };
});
// 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"
graphdirectory "github.com/microsoftgraph/msgraph-sdk-go/directory"
//other-imports
)
requestParameters := &graphdirectory.DirectoryAttributeSetsRequestBuilderGetQueryParameters{
Orderby: [] string {"id"},
}
configuration := &graphdirectory.DirectoryAttributeSetsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
attributeSets, err := graphClient.Directory().AttributeSets().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AttributeSetCollectionResponse result = graphClient.directory().attributeSets().get(requestConfiguration -> {
requestConfiguration.queryParameters.orderby = new String []{"id"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.directory.attribute_sets.attribute_sets_request_builder import AttributeSetsRequestBuilder
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 = AttributeSetsRequestBuilder.AttributeSetsRequestBuilderGetQueryParameters(
orderby = ["id"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.directory.attribute_sets.get(request_configuration = request_configuration)