class Agreement
Represents a tenant's customizable terms of use agreement managed within Azure Active Directory (Azure AD).
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/termsofuse/agreement.py
4 - 9
simple
Purpose
This class serves as a data model for Azure AD Terms of Use agreements. It inherits from Entity and provides a structured representation of tenant-specific terms of use agreements that can be created, managed, and enforced within Azure Active Directory. The class is designed to work with Azure AD's Terms of Use feature, allowing organizations to present legal agreements or compliance documents to users.
Source Code
class Agreement(Entity):
"""
Represents a tenant's customizable terms of use agreement that is created and managed with
Azure Active Directory (Azure AD). You can use the following methods to create and manage the Azure Active Directory
Terms of Use feature according to your scenario.
"""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
bases: Inherits from Entity class, which likely provides base functionality for Azure AD entities such as serialization, property management, and API interaction capabilities
Return Value
Instantiation returns an Agreement object representing an Azure AD Terms of Use agreement. The object inherits all properties and methods from the Entity base class, providing access to agreement-specific attributes and operations.
Class Interface
Dependencies
office365
Required Imports
from office365.entity import Entity
from office365.directory.agreements.agreement import Agreement
Usage Example
from office365.directory.agreements.agreement import Agreement
from office365.graph_client import GraphClient
# Initialize Graph client with credentials
client = GraphClient.with_client_credentials(
tenant='your-tenant-id',
client_id='your-client-id',
client_secret='your-client-secret'
)
# Retrieve existing agreements
agreements = client.agreements.get().execute_query()
for agreement in agreements:
print(f"Agreement: {agreement.display_name}")
# Create a new agreement instance
new_agreement = Agreement()
# Set properties and save (specific methods depend on Entity base class implementation)
Best Practices
- Always authenticate with appropriate Azure AD permissions before attempting to create or modify agreements
- Use the GraphClient to properly instantiate and manage Agreement objects rather than direct instantiation
- Ensure proper error handling when working with Azure AD API operations
- The Agreement class is a data model; actual CRUD operations are typically performed through the parent GraphClient or collection methods
- Verify that your Azure AD tenant has the Terms of Use feature enabled before using this class
- Follow Azure AD best practices for managing sensitive compliance documents
- The class inherits from Entity, so familiarize yourself with Entity's methods for property access and modification
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class AgreementAcceptance 83.9% similar
-
class TermsOfUseContainer 80.6% similar
-
class TenantRelationship 65.2% similar
-
class IdentityGovernance 59.8% similar
-
class TenantInformation 59.1% similar