Microsoft Graph Agreement Files API
Operations for managing agreement file content and properties
Operations for managing agreement file content and properties
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/microsoft-graph:microsoft-graph-agreement-files-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Microsoft Graph Agreements Agreement Files API
description: 'Microsoft Graph API for managing agreements in Microsoft Entra ID.
This API enables organizations to create, manage, and track terms of use agreements,
including agreement files, localizations, and user acceptances.'
version: 1.0.0
contact:
name: Microsoft Graph API Support
url: https://developer.microsoft.com/graph
servers:
- url: https://graph.microsoft.com/v1.0
description: Microsoft Graph API v1.0 endpoint
tags:
- name: Agreement Files
description: Operations for managing agreement file content and properties
paths:
/agreements/{agreement-id}/file:
description: Provides operations to manage the file property of an agreement entity.
parameters:
- $ref: '#/components/parameters/AgreementId'
get:
tags:
- Agreement Files
summary: Microsoft Graph Get agreement file
description: Retrieve the default PDF file linked to an agreement.
operationId: getAgreementFile
parameters:
- name: $select
in: query
description: Select properties to be returned
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
- name: $expand
in: query
description: Expand related entities
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
responses:
2XX:
description: Retrieved navigation property
content:
application/json:
schema:
$ref: '#/components/schemas/AgreementFile'
examples:
GetAgreementFileResponse:
$ref: '#/components/examples/GetAgreementFileResponse'
4XX:
$ref: '#/components/responses/ErrorResponse'
5XX:
$ref: '#/components/responses/ErrorResponse'
x-ms-docs-operation-type: operation
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: default
patch:
tags:
- Agreement Files
summary: Microsoft Graph Update agreement file
description: Update the properties of the default file for an agreement.
operationId: updateAgreementFile
requestBody:
description: New property values for the agreement file
content:
application/json:
schema:
$ref: '#/components/schemas/AgreementFile'
examples:
UpdateAgreementFileRequest:
$ref: '#/components/examples/UpdateAgreementFileRequest'
required: true
responses:
2XX:
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AgreementFile'
examples:
UpdateAgreementFileResponse:
$ref: '#/components/examples/UpdateAgreementFileResponse'
4XX:
$ref: '#/components/responses/ErrorResponse'
5XX:
$ref: '#/components/responses/ErrorResponse'
x-ms-docs-operation-type: operation
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: default
delete:
tags:
- Agreement Files
summary: Microsoft Graph Delete agreement file
description: Delete the default file associated with an agreement.
operationId: deleteAgreementFile
parameters:
- name: If-Match
in: header
description: ETag for optimistic concurrency control
schema:
type: string
responses:
'204':
description: Success - No content returned
4XX:
$ref: '#/components/responses/ErrorResponse'
5XX:
$ref: '#/components/responses/ErrorResponse'
x-ms-docs-operation-type: operation
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: default
components:
examples:
GetAgreementFileResponse:
summary: Example response for getting an agreement file
value:
id: 00000000-0000-0000-0000-000000000002
displayName: Terms of Use - English
fileName: terms-of-use.pdf
language: en-US
isDefault: true
isMajorVersion: true
createdDateTime: '2024-01-01T00:00:00Z'
'@odata.type': '#microsoft.graph.agreementFile'
UpdateAgreementFileResponse:
summary: Example response for updated agreement file
value:
id: 00000000-0000-0000-0000-000000000002
displayName: Updated Terms of Use - English
fileName: terms-of-use.pdf
language: en-US
isDefault: true
isMajorVersion: true
createdDateTime: '2024-01-01T00:00:00Z'
'@odata.type': '#microsoft.graph.agreementFile'
UpdateAgreementFileRequest:
summary: Example request to update an agreement file
value:
displayName: Updated Terms of Use - English
isDefault: true
'@odata.type': '#microsoft.graph.agreementFile'
schemas:
AgreementFileVersion:
allOf:
- $ref: '#/components/schemas/AgreementFileProperties'
- title: AgreementFileVersion
required:
- '@odata.type'
type: object
properties:
'@odata.type':
type: string
x-ms-discriminator-value: '#microsoft.graph.agreementFileVersion'
InnerError:
title: InnerError
type: object
description: The structure of this object is service-specific
AgreementFileProperties:
allOf:
- $ref: '#/components/schemas/Entity'
- title: AgreementFileProperties
type: object
properties:
createdDateTime:
pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
type: string
description: The date time representing when the file was created. Read-only.
format: date-time
nullable: true
displayName:
type: string
description: Localized display name of the policy file of an agreement.
nullable: true
fileData:
anyOf:
- $ref: '#/components/schemas/AgreementFileData'
- type: object
nullable: true
description: Data that represents the terms of use PDF document.
fileName:
type: string
description: Name of the agreement file.
nullable: true
isDefault:
type: boolean
description: If none of the languages matches the client preference, indicates whether this is the default agreement file.
nullable: true
isMajorVersion:
type: boolean
description: Indicates whether the agreement file is a major version update.
nullable: true
language:
type: string
description: The language of the agreement file in the format languagecode2-country/regioncode2.
nullable: true
'@odata.type':
type: string
AgreementFileData:
title: AgreementFileData
type: object
properties:
data:
type: string
description: Data that represents the terms of use PDF document. Read-only.
format: base64url
nullable: true
'@odata.type':
type: string
Entity:
title: Entity
type: object
properties:
id:
type: string
description: The unique identifier for an entity. Read-only.
'@odata.type':
type: string
AgreementFileLocalization:
allOf:
- $ref: '#/components/schemas/AgreementFileProperties'
- title: AgreementFileLocalization
required:
- '@odata.type'
type: object
properties:
versions:
type: array
items:
$ref: '#/components/schemas/AgreementFileVersion'
description: Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant.
x-ms-navigationProperty: true
'@odata.type':
type: string
x-ms-discriminator-value: '#microsoft.graph.agreementFileLocalization'
AgreementFile:
allOf:
- $ref: '#/components/schemas/AgreementFileProperties'
- title: AgreementFile
required:
- '@odata.type'
type: object
properties:
localizations:
type: array
items:
$ref: '#/components/schemas/AgreementFileLocalization'
description: The localized version of the terms of use agreement files attached to the agreement.
x-ms-navigationProperty: true
'@odata.type':
type: string
x-ms-discriminator-value: '#microsoft.graph.agreementFile'
ErrorDetail:
title: ErrorDetail
required:
- code
- message
type: object
properties:
code:
type: string
message:
type: string
target:
type: string
nullable: true
MainError:
title: MainError
required:
- code
- message
type: object
properties:
code:
type: string
message:
type: string
x-ms-primary-error-message: true
target:
type: string
nullable: true
details:
type: array
items:
$ref: '#/components/schemas/ErrorDetail'
innerError:
$ref: '#/components/schemas/InnerError'
ODataError:
title: ODataError
required:
- error
type: object
properties:
error:
$ref: '#/components/schemas/MainError'
responses:
ErrorResponse:
description: Error response
content:
application/json:
schema:
$ref: '#/components/schemas/ODataError'
parameters:
AgreementId:
name: agreement-id
in: path
description: The unique identifier of the agreement
required: true
schema:
type: string
x-ms-docs-key-type: agreement