Recupere os detalhes de um arquivo de contrato, incluindo as informações de linguagem e versão. O arquivo padrão pode ter várias versões, cada uma com seu próprio idioma, que podem ser recuperadas especificando o cabeçalho Accept-Language .
Escolha a permissão ou as permissões marcadas como menos privilegiadas para essa API. Use uma permissão ou permissões privilegiadas mais altas 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 privilegiadas mais altas
Delegado (conta corporativa ou de estudante)
Agreement.Read.All
Agreement.ReadWrite.All
Delegado (conta pessoal da Microsoft)
Sem suporte.
Sem suporte.
Aplicativo
Sem suporte.
Sem suporte.
Solicitação HTTP
GET /agreements/{agreementsId}/file
Parâmetros de consulta opcionais
Esse método não dá suporte a nenhum parâmetro de consulta 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/identityGovernance/termsOfUse/agreements/94410bbf-3d3e-4683-8149-f034e55c39dd/file
// 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.IdentityGovernance.TermsOfUse.Agreements["{agreement-id}"].File.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
file, err := graphClient.IdentityGovernance().TermsOfUse().Agreements().ByAgreementId("agreement-id").File().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AgreementFile result = graphClient.identityGovernance().termsOfUse().agreements().byAgreementId("{agreement-id}").file().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.identity_governance.terms_of_use.agreements.by_agreement_id('agreement-id').file.get()
Exemplo 2: Obter o arquivo de contrato para um idioma específico
Solicitação
O exemplo a seguir mostra como obter o arquivo de contrato para o fr-FR idioma. Se nenhum arquivo de contrato existir, o arquivo de contrato padrão será retornado.
GET https://graph.microsoft.com/v1.0/agreements/94410bbf-3d3e-4683-8149-f034e55c39dd/file
Accept-Language: fr-FR
// 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.Agreements["{agreement-id}"].File.GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Accept-Language", "fr-FR");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphagreements "github.com/microsoftgraph/msgraph-sdk-go/agreements"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("Accept-Language", "fr-FR")
configuration := &graphagreements.ItemFileRequestBuilderGetRequestConfiguration{
Headers: headers,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
file, err := graphClient.Agreements().ByAgreementId("agreement-id").File().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AgreementFile result = graphClient.agreements().byAgreementId("{agreement-id}").file().get(requestConfiguration -> {
requestConfiguration.headers.add("Accept-Language", "fr-FR");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.agreements.item.file.file_request_builder import FileRequestBuilder
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
request_configuration = RequestConfiguration()
request_configuration.headers.add("Accept-Language", "fr-FR")
result = await graph_client.agreements.by_agreement_id('agreement-id').file.get(request_configuration = request_configuration)