Skip to content

O365Client

flowtask.interfaces.O365Client

O365Client

O365Client(*args, **kwargs)

Bases: CredentialsInterface

O365Client

Overview

The O365Client class is an abstract base class for managing connections to Office 365 services.
It handles authentication, credential processing, and provides a method for obtaining the
Office 365 context. It uses the Office 365 Python SDK for authentication and context management.

.. table:: Properties :widths: auto

+------------------+----------+--------------------------------------------------------------------------------------------------+
| Name             | Required | Description                                                                                      |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| url              |   No     | The base URL for the Office 365 service.                                                         |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| tenant           |   Yes    | The tenant ID for the Office 365 service.                                                        |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| site             |   No     | The site URL for the Office 365 service.                                                         |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| auth_context     |   Yes    | The authentication context for Office 365.                                                       |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| context          |   Yes    | The context object for Office 365 operations.                                                    |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| credentials      |   Yes    | A dictionary containing the credentials for authentication.                                      |
+------------------+----------+--------------------------------------------------------------------------------------------------+

Return

The methods in this class manage the authentication and connection setup for Office 365 services,
providing an abstract base for subclasses to implement specific service interactions.

acquire_token

acquire_token(scopes=None)

Acquire a Token via MSAL.

run_in_executor async

run_in_executor(fn, *args, **kwargs)

Calling any blocking process in an executor.