Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
Tipo de permissão
Permissões com menos privilégios
Permissões com privilégios superiores
Delegado (conta corporativa ou de estudante)
CustomSecAttributeDefinition.Read.All
CustomSecAttributeDefinition.ReadWrite.All
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Application
CustomSecAttributeDefinition.Read.All
CustomSecAttributeDefinition.ReadWrite.All
Importante
Em cenários delegados com contas escolares ou profissionais, o utilizador com sessão iniciada tem de ter uma função de Microsoft Entra suportada ou uma função personalizada com uma permissão de função suportada. As seguintes funções privilegiadas são suportadas para esta operação.
Leitor de Atribuição de Atributos
Leitor de Definições de Atributos
Administrador de Atribuição de Atributos
Administrador de Definição de Atributos
Por predefinição, o Administrador Global e outras funções de administrador não têm permissões para ler, definir ou atribuir atributos de segurança personalizados.
Solicitação HTTP
GET /directory/attributeSets
Parâmetros de consulta opcionais
Este método suporta os $selectparâmetros de consulta , $tope $orderby OData para ajudar a personalizar a resposta. Para obter informações gerais, acesse 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)