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.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
Agreement.Read.All
Agreement.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Not supported.
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.
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 version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AgreementFile result = graphClient.identityGovernance().termsOfUse().agreements().byAgreementId("{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
// 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 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");
});
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.