Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Agreement.Read.All, Agreement.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
HTTP request
GET /agreements/{agreementsId}/file
Optional query parameters
This method does not support any OData query parameters to help customize the response. For general information, see OData query parameters.
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Accept-Language
A valid ISO 639-1 locale. Optional.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK response code and a collection of agreementFile objects in the response body.
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
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.IdentityGovernance.TermsOfUse.Agreements["{agreement-id}"].File.GetAsync();
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->identityGovernance()->termsOfUse()->agreements()->byAgreementId('agreement-id')->file()->get()->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
result = await graph_client.identity_governance.term_of_use.agreements.by_agreement_id('agreement-id').file.get()
Example 2: Get the agreement file for a specific language
Request
The following example shows how to get the agreement file for the fr-FR language. If no such agreement file exists, the default agreement file is returned.
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
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.Agreements["{agreement-id}"].File.GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Accept-Language", "fr-FR");
});
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new FileRequestBuilderGetRequestConfiguration();
$headers = [
'Accept-Language' => 'fr-FR',
];
$requestConfiguration->headers = $headers;
$result = $graphServiceClient->agreements()->byAgreementId('agreement-id')->file()->get($requestConfiguration)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_configuration = FileRequestBuilder.FileRequestBuilderGetRequestConfiguration(
headers = {
'Accept-Language' : "fr-FR",
}
)
result = await graph_client.agreements.by_agreement_id('agreement-id').file.get(request_configuration = request_configuration)