Ms365Usage¶
flowtask.components.MS365Usage
¶
MS365Usage
¶
Bases: Azure
MS365Usage
Overview
The MS365Usage class is a component for retrieving Microsoft 365 usage reports via the Microsoft Graph API.
It extends the Azure class and supports various report types such as M365, Teams, SharePoint, OneDrive, and Yammer.
.. table:: Properties :widths: auto
+------------------+----------+--------------------------------------------------------------------------------------------------+
| Name | Required | Description |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| report_type | No | The type of report to retrieve, defaults to "M365". |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| usage_method | No | The usage method for the report, defaults to "UserDetail". |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| _report | Yes | The specific report endpoint to use based on the report type and usage method. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| period | No | The period for the report, defaults to "D7". |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| format | No | The format of the report, defaults to "text/csv". |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| method | Yes | The HTTP method to use for the API request, set to "GET". |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| download | Yes | Flag indicating if a file download is required, set to False. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| url | Yes | The formatted URL for the API request. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| app | Yes | The MSAL app instance for authentication. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| token_type | Yes | The type of authentication token. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| auth | Yes | Dictionary containing the authentication details. |
+------------------+----------+--------------------------------------------------------------------------------------------------+
Return
The methods in this class manage the retrieval and processing of Microsoft 365 usage reports, including initialization,
API request execution, and result handling.
Example:
```yaml
MS365Usage:
period: D7
report_type: Yammer
usage_method: UserDetail
credentials:
client_id: OFFICE_365_REPORT_ID
client_secret: OFFICE_365_REPORT_SECRET
tenant_id: AZURE_ADFS_TENANT_ID
```