🔍 Code Extractor

class Agreement

Maturity: 46

Represents a tenant's customizable terms of use agreement managed within Azure Active Directory (Azure AD).

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/termsofuse/agreement.py
Lines:
4 - 9
Complexity:
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

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class AgreementAcceptance 83.9% similar

    Represents the current status of a user's response to a company's customizable terms of use agreement powered by Azure Active Directory (Azure AD).

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/termsofuse/agreement_acceptance.py
  • class TermsOfUseContainer 80.6% similar

    A container class that provides access to Azure Active Directory's terms of use API, exposing relationships for managing agreements and agreement acceptances.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/termsofuse/container.py
  • class TenantRelationship 65.2% similar

    A class representing tenant relationships in Azure AD, providing methods to query and validate tenant information across different Azure AD tenants.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/tenant_relationship.py
  • class IdentityGovernance 59.8% similar

    A singleton container class that provides access to Azure Active Directory identity governance features including access reviews, entitlement management, app consent, and terms of use.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identitygovernance/governance.py
  • class TenantInformation 59.1% similar

    A data class representing publicly displayed information about an Azure AD tenant, including domain name, display name, federation brand name, and tenant ID.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/tenant_information.py
← Back to Browse