Office365-REST-Python-Client 2.5.14__py3-none-any.whl → 2.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. {Office365_REST_Python_Client-2.5.14.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/METADATA +2 -2
  2. {Office365_REST_Python_Client-2.5.14.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/RECORD +210 -112
  3. office365/admin/__init__.py +0 -0
  4. office365/admin/admin.py +69 -0
  5. office365/admin/microsoft365_apps.py +5 -0
  6. office365/admin/people_settings.py +5 -0
  7. office365/admin/report_settings.py +5 -0
  8. office365/{onedrive → admin}/sharepoint.py +1 -1
  9. office365/azure_env.py +60 -0
  10. office365/directory/applications/app_ids.py +6 -0
  11. office365/directory/authentication/authentication.py +16 -0
  12. office365/directory/authentication/method_target.py +2 -1
  13. office365/directory/authentication/methods/microsoft_authenticator.py +6 -0
  14. office365/directory/authentication/methods/root.py +11 -0
  15. office365/directory/authentication/methods/sms.py +9 -0
  16. office365/directory/certificates/self_signed.py +31 -2
  17. office365/directory/identities/conditional_access_root.py +14 -0
  18. office365/directory/identitygovernance/privilegedaccess/approval.py +8 -0
  19. office365/directory/identitygovernance/privilegedaccess/group.py +30 -0
  20. office365/directory/identitygovernance/privilegedaccess/group_assignment_schedule_instance.py +7 -0
  21. office365/directory/identitygovernance/privilegedaccess/unified_role_assignment_schedule_request.py +7 -0
  22. office365/directory/identitygovernance/userconsent/request_collection.py +10 -0
  23. office365/directory/identitygovernance/workflow/__init__.py +0 -0
  24. office365/directory/identitygovernance/workflow/base.py +5 -0
  25. office365/directory/policies/cross_tenant_access.py +13 -0
  26. office365/directory/policies/feature_rollout.py +16 -0
  27. office365/directory/policies/root.py +39 -23
  28. office365/directory/policies/template.py +5 -0
  29. office365/directory/protection/threatassessment/email_file_request.py +20 -0
  30. office365/directory/protection/threatassessment/request.py +25 -0
  31. office365/directory/rolemanagement/application.py +15 -0
  32. office365/directory/rolemanagement/resource_action.py +8 -4
  33. office365/directory/rolemanagement/role_permission.py +3 -3
  34. office365/directory/security/alerts/collection.py +49 -0
  35. office365/directory/security/scorecontrol/__init__.py +0 -0
  36. office365/directory/security/scorecontrol/profile.py +6 -0
  37. office365/directory/security/security.py +17 -4
  38. office365/directory/serviceprincipals/service_principal.py +36 -28
  39. office365/directory/tenantinformation/__init__.py +0 -0
  40. office365/directory/tenantinformation/multi_organization.py +11 -0
  41. office365/directory/tenantinformation/relationship.py +61 -0
  42. office365/directory/users/insights_settings.py +5 -0
  43. office365/graph_client.py +52 -132
  44. office365/graph_request.py +78 -19
  45. office365/intune/servicecommunications/health/health.py +1 -1
  46. office365/intune/servicecommunications/issues/issue.py +2 -2
  47. office365/onedrive/columns/definition.py +1 -1
  48. office365/onedrive/contenttypes/content_type.py +1 -1
  49. office365/onedrive/driveitems/driveItem.py +13 -1
  50. office365/onedrive/drives/drive.py +1 -1
  51. office365/onedrive/filestorage/__init__.py +0 -0
  52. office365/onedrive/filestorage/container.py +7 -0
  53. office365/onedrive/filestorage/file_storage.py +20 -0
  54. office365/onedrive/listitems/field_value_set.py +1 -1
  55. office365/onedrive/listitems/list_item.py +1 -1
  56. office365/onedrive/lists/list.py +1 -1
  57. office365/onedrive/recyclebin/__init__.py +0 -0
  58. office365/onedrive/recyclebin/item.py +6 -0
  59. office365/onedrive/recyclebin/recyclebin.py +29 -0
  60. office365/onedrive/recyclebin/settings.py +13 -0
  61. office365/onedrive/shares/drive_item.py +1 -1
  62. office365/onedrive/sitepages/base.py +1 -1
  63. office365/onedrive/sitepages/canvas_layout.py +2 -2
  64. office365/onedrive/sitepages/sections/__init__.py +0 -0
  65. office365/onedrive/sitepages/{horizontal_section.py → sections/horizontal.py} +1 -1
  66. office365/onedrive/sitepages/webparts/data.py +5 -0
  67. office365/onedrive/sitepages/webparts/position.py +5 -0
  68. office365/onedrive/sitepages/webparts/standard.py +9 -0
  69. office365/onedrive/sitepages/webparts/web_part.py +12 -0
  70. office365/onedrive/sites/site.py +1 -1
  71. office365/onedrive/storage/storage.py +10 -0
  72. office365/onedrive/workbooks/charts/axes.py +41 -1
  73. office365/onedrive/workbooks/charts/axis.py +5 -0
  74. office365/onedrive/workbooks/charts/chart.py +64 -5
  75. office365/onedrive/workbooks/charts/fill.py +5 -0
  76. office365/onedrive/workbooks/charts/font.py +5 -0
  77. office365/onedrive/workbooks/charts/legend/__init__.py +0 -0
  78. office365/onedrive/workbooks/charts/legend/format.py +5 -0
  79. office365/onedrive/workbooks/charts/legend/legend.py +26 -0
  80. office365/onedrive/workbooks/charts/point.py +5 -0
  81. office365/onedrive/workbooks/charts/series/__init__.py +0 -0
  82. office365/onedrive/workbooks/charts/series/format.py +5 -0
  83. office365/onedrive/workbooks/charts/series/series.py +31 -0
  84. office365/onedrive/workbooks/charts/title.py +5 -0
  85. office365/onedrive/workbooks/filter.py +10 -0
  86. office365/onedrive/workbooks/filter_criteria.py +3 -3
  87. office365/onedrive/workbooks/ranges/fill.py +11 -1
  88. office365/onedrive/workbooks/ranges/range.py +26 -0
  89. office365/onedrive/workbooks/ranges/view.py +14 -0
  90. office365/onedrive/workbooks/sort_field.py +8 -3
  91. office365/onedrive/workbooks/tables/sort.py +20 -0
  92. office365/onedrive/workbooks/worksheets/worksheet.py +11 -0
  93. office365/partners/billing/azure_usage.py +17 -0
  94. office365/partners/billing/billed_usage.py +21 -0
  95. office365/partners/billing/billing.py +17 -0
  96. office365/partners/billing/operation.py +5 -0
  97. office365/partners/partners.py +17 -0
  98. office365/reports/root.py +9 -0
  99. office365/reports/userregistration/feature_summary.py +5 -0
  100. office365/runtime/auth/auth_cookies.py +48 -0
  101. office365/runtime/auth/authentication_context.py +36 -19
  102. office365/runtime/auth/entra/__init__.py +0 -0
  103. office365/runtime/auth/entra/authentication_context.py +165 -0
  104. office365/runtime/auth/providers/acs_token_provider.py +12 -27
  105. office365/runtime/auth/providers/saml_token_provider.py +41 -54
  106. office365/runtime/auth/sts_profile.py +8 -8
  107. office365/runtime/auth/token_response.py +4 -0
  108. office365/sharepoint/administration/custom_fonts_resource.py +5 -0
  109. office365/sharepoint/administration/sitemove/__init__.py +0 -0
  110. office365/sharepoint/administration/sitemove/service.py +68 -0
  111. office365/sharepoint/administration/sitemove/service_info.py +11 -0
  112. office365/sharepoint/changes/item.py +15 -0
  113. office365/sharepoint/client_context.py +61 -37
  114. office365/sharepoint/directory/group.py +2 -0
  115. office365/sharepoint/directory/helper.py +2 -0
  116. office365/sharepoint/directory/provider/provider.py +6 -0
  117. office365/sharepoint/directory/user.py +20 -0
  118. office365/sharepoint/files/publish/__init__.py +0 -0
  119. office365/sharepoint/files/publish/status.py +9 -0
  120. office365/sharepoint/flows/connector_result.py +17 -0
  121. office365/sharepoint/flows/permissions.py +11 -7
  122. office365/sharepoint/fontpackages/__init__.py +0 -0
  123. office365/sharepoint/fontpackages/collection.py +26 -0
  124. office365/sharepoint/fontpackages/creation_parameters.py +5 -0
  125. office365/sharepoint/fontpackages/font_package.py +5 -0
  126. office365/sharepoint/fontpackages/oob_settings.py +5 -0
  127. office365/sharepoint/forms/customization.py +26 -0
  128. office365/sharepoint/ir/__init__.py +0 -0
  129. office365/sharepoint/ir/migration.py +5 -0
  130. office365/sharepoint/lists/list.py +30 -0
  131. office365/sharepoint/marketplace/app_metadata.py +12 -1
  132. office365/sharepoint/marketplace/app_metadata_collection.py +8 -0
  133. office365/sharepoint/marketplace/corporatecuratedgallery/addins/instance_info.py +22 -0
  134. office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_failed_info.py +5 -0
  135. office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_info.py +12 -0
  136. office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_response.py +15 -0
  137. office365/sharepoint/marketplace/corporatecuratedgallery/addins/principals_response.py +5 -0
  138. office365/sharepoint/marketplace/corporatecuratedgallery/app_request_information.py +9 -0
  139. office365/sharepoint/marketplace/corporatecuratedgallery/app_response_information.py +9 -0
  140. office365/sharepoint/marketplace/corporatecuratedgallery/available_addins_response.py +4 -0
  141. office365/sharepoint/marketplace/corporatecuratedgallery/card_design.py +9 -0
  142. office365/sharepoint/marketplace/corporatecuratedgallery/card_designs.py +9 -0
  143. office365/sharepoint/marketplace/corporatecuratedgallery/teams_package_download.py +14 -0
  144. office365/sharepoint/marketplace/tenant/appcatalog/accessor.py +62 -3
  145. office365/sharepoint/multigeo/services.py +14 -0
  146. office365/sharepoint/multigeo/storage_quota.py +9 -0
  147. office365/sharepoint/policy/license_utilities.py +27 -0
  148. office365/sharepoint/principal/principal.py +6 -0
  149. office365/sharepoint/request.py +95 -10
  150. office365/sharepoint/search/administration/document_crawl_log.py +16 -2
  151. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +1 -1
  152. office365/sharepoint/search/reports/abandoned_queries.py +11 -1
  153. office365/sharepoint/search/reports/abandonedqueries/item.py +7 -1
  154. office365/sharepoint/sharing/domain_restriction_settings.py +5 -0
  155. office365/sharepoint/sharing/information.py +12 -0
  156. office365/sharepoint/sitehealth/result.py +4 -4
  157. office365/sharepoint/sitehealth/summary.py +5 -5
  158. office365/sharepoint/sites/copy_job_progress.py +5 -0
  159. office365/sharepoint/sites/copy_migration_iInfo.py +5 -0
  160. office365/sharepoint/sites/home/__init__.py +0 -0
  161. office365/sharepoint/sites/{sph_site.py → home/site.py} +1 -1
  162. office365/sharepoint/sites/site.py +26 -1
  163. office365/sharepoint/tenant/administration/app_service_principal_public.py +17 -0
  164. office365/sharepoint/tenant/administration/audit/data.py +12 -0
  165. office365/sharepoint/tenant/administration/audit/unified_record.py +18 -0
  166. office365/sharepoint/tenant/administration/coms/__init__.py +0 -0
  167. office365/sharepoint/tenant/administration/coms/messages_fields_data.py +5 -0
  168. office365/sharepoint/tenant/administration/coms/messages_service_proxy.py +16 -0
  169. office365/sharepoint/tenant/administration/copilot/__init__.py +0 -0
  170. office365/sharepoint/tenant/administration/copilot/adaptive_card_config.py +11 -0
  171. office365/sharepoint/tenant/administration/datagovernance/__init__.py +0 -0
  172. office365/sharepoint/tenant/administration/datagovernance/client_base.py +9 -0
  173. office365/sharepoint/tenant/administration/datagovernance/insight_client.py +82 -0
  174. office365/sharepoint/tenant/administration/datagovernance/insight_metadata.py +5 -0
  175. office365/sharepoint/tenant/administration/default_time_zone_id.py +11 -0
  176. office365/sharepoint/tenant/administration/endpoints.py +53 -2
  177. office365/sharepoint/tenant/administration/insights/onedrive_site_sharing.py +4 -0
  178. office365/sharepoint/tenant/administration/internal/appservice/permission_request.py +4 -0
  179. office365/sharepoint/tenant/administration/malware/__init__.py +0 -0
  180. office365/sharepoint/tenant/administration/malware/file.py +18 -0
  181. office365/sharepoint/tenant/administration/modified_property.py +5 -0
  182. office365/sharepoint/tenant/administration/policies/content_security_configuration.py +9 -0
  183. office365/sharepoint/tenant/administration/recent_action.py +9 -0
  184. office365/sharepoint/tenant/administration/reports/__init__.py +0 -0
  185. office365/sharepoint/tenant/administration/settings_service.py +38 -5
  186. office365/sharepoint/tenant/administration/sites/properties.py +78 -0
  187. office365/sharepoint/tenant/administration/sites/properties_collection.py +19 -0
  188. office365/sharepoint/tenant/administration/tenant.py +134 -7
  189. office365/sharepoint/tenant/administration/types.py +76 -1
  190. office365/sharepoint/tenant/insights/report_manager.py +29 -0
  191. office365/sharepoint/tenant/management/office365_tenant.py +7 -4
  192. office365/sharepoint/translation/job_status.py +22 -0
  193. office365/sharepoint/userprofiles/user_profile.py +6 -0
  194. office365/sharepoint/webparts/tile_data.py +21 -0
  195. office365/sharepoint/webs/dataleakage_prevention_status_info.py +5 -0
  196. office365/sharepoint/webs/web.py +80 -1
  197. office365/teams/chats/event_message_detail.py +8 -0
  198. office365/teams/deleted.py +24 -0
  199. office365/teams/work.py +35 -0
  200. office365/directory/tenant_relationship.py +0 -23
  201. office365/onedrive/admin.py +0 -32
  202. office365/onedrive/workbooks/charts/legend.py +0 -7
  203. office365/onedrive/workbooks/charts/series.py +0 -5
  204. {Office365_REST_Python_Client-2.5.14.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/LICENSE +0 -0
  205. {Office365_REST_Python_Client-2.5.14.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/WHEEL +0 -0
  206. {Office365_REST_Python_Client-2.5.14.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/top_level.txt +0 -0
  207. /office365/{onedrive → admin}/sharepoint_settings.py +0 -0
  208. /office365/directory/{tenant_information.py → tenantinformation/information.py} +0 -0
  209. /office365/{base_item.py → onedrive/base_item.py} +0 -0
  210. /office365/onedrive/sitepages/{horizontal_section_column.py → sections/horizontal_column.py} +0 -0
  211. /office365/onedrive/sitepages/{vertical_section.py → sections/vertical.py} +0 -0
  212. /office365/sharepoint/sites/{home_sites_details.py → home/details.py} +0 -0
  213. /office365/sharepoint/sites/{home_site_reference.py → home/reference.py} +0 -0
  214. /office365/sharepoint/tenant/administration/{app_billing_properties.py → policies/app_billing_properties.py} +0 -0
@@ -1,7 +1,25 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.tenant.administration.audit.data import AuditData
2
3
 
3
4
 
4
5
  class UnifiedAuditRecord(ClientValue):
6
+
7
+ def __init__(
8
+ self,
9
+ audit_data=AuditData(),
10
+ creation_date=None,
11
+ operation=None,
12
+ record_id=None,
13
+ record_type=None,
14
+ user_id=None,
15
+ ):
16
+ self.AuditData = audit_data
17
+ self.CreationDate = creation_date
18
+ self.Operation = operation
19
+ self.RecordId = record_id
20
+ self.RecordType = record_type
21
+ self.UserId = user_id
22
+
5
23
  @property
6
24
  def entity_type_name(self):
7
25
  return "Microsoft.SharePoint.Administration.TenantAdmin.UnifiedAuditRecord"
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class MessagesFieldsData(ClientValue):
5
+ """ """
@@ -0,0 +1,16 @@
1
+ from office365.runtime.paths.resource_path import ResourcePath
2
+ from office365.sharepoint.entity import Entity
3
+
4
+
5
+ class Office365CommsMessagesServiceProxy(Entity):
6
+ """"""
7
+
8
+ def __init__(self, context):
9
+ static_path = ResourcePath(
10
+ "Microsoft.Online.SharePoint.TenantAdministration.Office365CommsMessagesServiceProxy"
11
+ )
12
+ super(Office365CommsMessagesServiceProxy, self).__init__(context, static_path)
13
+
14
+ @property
15
+ def entity_type_name(self):
16
+ return "Microsoft.Online.SharePoint.TenantAdministration.Office365CommsMessagesServiceProxy"
@@ -0,0 +1,11 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class AdaptiveCardConfig(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return (
10
+ "Microsoft.SharePoint.Administration.TenantAdmin.Copilot.AdaptiveCardConfig"
11
+ )
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SPDataGovernanceRestApiClientBase(Entity):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceRestApiClientBase"
@@ -0,0 +1,82 @@
1
+ from typing import TYPE_CHECKING
2
+
3
+ from office365.runtime.client_result import ClientResult
4
+ from office365.runtime.paths.service_operation import ServiceOperationPath
5
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
6
+ from office365.sharepoint.tenant.administration.datagovernance.client_base import (
7
+ SPDataGovernanceRestApiClientBase,
8
+ )
9
+ from office365.sharepoint.tenant.administration.datagovernance.insight_metadata import (
10
+ SPDataGovernanceInsightMetadata,
11
+ )
12
+
13
+ if TYPE_CHECKING:
14
+ from office365.sharepoint.client_context import ClientContext
15
+
16
+
17
+ class SPDataGovernanceInsightRestApiClient(SPDataGovernanceRestApiClientBase):
18
+ """"""
19
+
20
+ def __init__(self, context, authorization_header, url, user_agent):
21
+ # type: (ClientContext, str, str, str) -> None
22
+ static_path = ServiceOperationPath(
23
+ "Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightRestApiClient",
24
+ {
25
+ "authorizationHeader": authorization_header,
26
+ "url": url,
27
+ "userAgent": user_agent,
28
+ },
29
+ )
30
+ super(SPDataGovernanceInsightRestApiClient, self).__init__(context, static_path)
31
+
32
+ def create_data_access_governance_report(
33
+ self,
34
+ report_entity,
35
+ workload,
36
+ report_type,
37
+ file_sensitivity_label_name,
38
+ file_sensitivity_label_guid,
39
+ name,
40
+ template,
41
+ privacy,
42
+ site_sensitivity_label_guid,
43
+ count_of_users_more_than,
44
+ ):
45
+ """ """
46
+ return_type = ClientResult(self.context, SPDataGovernanceInsightMetadata())
47
+ payload = {
48
+ "reportEntity": report_entity,
49
+ "workload": workload,
50
+ "reportType": report_type,
51
+ "fileSensitivityLabelName": file_sensitivity_label_name,
52
+ "fileSensitivityLabelGUID": file_sensitivity_label_guid,
53
+ "name": name,
54
+ "template": template,
55
+ "privacy": privacy,
56
+ "siteSensitivityLabelGUID": site_sensitivity_label_guid,
57
+ "countOfUsersMoreThan": count_of_users_more_than,
58
+ }
59
+ qry = ServiceOperationQuery(
60
+ self,
61
+ "CreateDataAccessGovernanceReport",
62
+ None,
63
+ payload,
64
+ None,
65
+ return_type,
66
+ )
67
+ self.context.add_query(qry)
68
+ return return_type
69
+
70
+ def export_spo_data_access_governance_insight(self, report_id):
71
+ return_type = ClientResult(self.context, str())
72
+ payload = {"reportId": report_id}
73
+ qry = ServiceOperationQuery(
74
+ self,
75
+ "ExportSPODataAccessGovernanceInsight",
76
+ None,
77
+ payload,
78
+ None,
79
+ return_type,
80
+ )
81
+ self.context.add_query(qry)
82
+ return return_type
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SPDataGovernanceInsightMetadata(ClientValue):
5
+ """ """
@@ -0,0 +1,11 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TenantDefaultTimeZoneId(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return (
10
+ "Microsoft.Online.SharePoint.TenantAdministration.TenantDefaultTimeZoneId"
11
+ )
@@ -1,15 +1,66 @@
1
- from typing import Optional
1
+ from typing import TYPE_CHECKING, Optional
2
2
 
3
+ from office365.runtime.paths.resource_path import ResourcePath
3
4
  from office365.sharepoint.entity import Entity
4
5
 
6
+ if TYPE_CHECKING:
7
+ from office365.sharepoint.client_context import ClientContext
8
+
5
9
 
6
10
  class TenantAdminEndpoints(Entity):
11
+
12
+ def __init__(self, context):
13
+ # type: (ClientContext) -> None
14
+ static_path = ResourcePath(
15
+ "Microsoft.Online.SharePoint.TenantAdministration.TenantAdminEndpoints"
16
+ )
17
+ super(TenantAdminEndpoints, self).__init__(context, static_path)
18
+
19
+ @property
20
+ def aad_admin_center_endpoint(self):
21
+ # type: () -> Optional[str]
22
+ """The URL for the Azure Active Directory Admin Center."""
23
+ return self.properties.get("AADAdminCenterEndpoint", None)
24
+
25
+ @property
26
+ def cdn_default_endpoint(self):
27
+ # type: () -> Optional[str]
28
+ """The base address of the default Content Delivery Network (CDN) used by SharePoint Online."""
29
+ return self.properties.get("CdnDefaultEndpoint", None)
30
+
7
31
  @property
8
32
  def o365_admin_center_endpoint(self):
9
33
  # type: () -> Optional[str]
10
- """"""
34
+ """The endpoint (URL) to the Office 365 Admin Center."""
11
35
  return self.properties.get("O365AdminCenterEndpoint", None)
12
36
 
37
+ @property
38
+ def cfrms_graph_endpoint(self):
39
+ # type: () -> Optional[str]
40
+ """The URL of the Microsoft Graph API specifically for managing Conditional Access policies and Rights
41
+ Management Services (RMS) settings within a tenant."""
42
+ return self.properties.get("CFRMSGraphEndpoint", None)
43
+
44
+ @property
45
+ def migration_agent_url(self):
46
+ # type: () -> Optional[str]
47
+ """The endpoint where the migration agent software or services can be accessed"""
48
+ return self.properties.get("MigrationAgentUrl", None)
49
+
50
+ @property
51
+ def mini_maven_endpoint(self):
52
+ # type: () -> Optional[str]
53
+ """URL used internally by SharePoint or Microsoft 365 services. It may be part of Microsoft's orchestration
54
+ or lightweight service framework for tenant or feature management."""
55
+ return self.properties.get("MiniMavenEndpoint", None)
56
+
57
+ @property
58
+ def sp_migration_tool_url(self):
59
+ # type: () -> Optional[str]
60
+ """URL to access the SharePoint Migration Tool, enabling users to download the software
61
+ for performing migrations"""
62
+ return self.properties.get("SPMigrationToolUrl", None)
63
+
13
64
  @property
14
65
  def entity_type_name(self):
15
66
  return "Microsoft.Online.SharePoint.TenantAdministration.TenantAdminEndpoints"
@@ -3,3 +3,7 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class OneDriveSiteSharingInsights(ClientValue):
5
5
  """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.OneDriveSiteSharingInsights"
@@ -4,6 +4,10 @@ from office365.sharepoint.entity import Entity
4
4
  class SPOWebAppServicePrincipalPermissionRequest(Entity):
5
5
  """ """
6
6
 
7
+ @property
8
+ def client_component_item_unique_id(self):
9
+ return self.properties.get("ClientComponentItemUniqueId", False)
10
+
7
11
  @property
8
12
  def entity_type_name(self):
9
13
  return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest"
@@ -0,0 +1,18 @@
1
+ from office365.runtime.paths.resource_path import ResourcePath
2
+ from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.files.file import File
4
+
5
+
6
+ class SPOMalwareFile(Entity):
7
+ """ """
8
+
9
+ @property
10
+ def file(self):
11
+ return self.properties.get(
12
+ "File",
13
+ File(self.context, ResourcePath("File", self.resource_path)),
14
+ )
15
+
16
+ @property
17
+ def entity_type_name(self):
18
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPOMalwareFile"
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ModifiedProperty(ClientValue):
5
+ """"""
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SPOContentSecurityPolicyConfiguration(Entity):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPOContentSecurityPolicyConfiguration"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TenantAdminRecentAction(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Administration.TenantAdmin.TenantAdminRecentAction"
@@ -3,15 +3,20 @@ from office365.runtime.paths.resource_path import ResourcePath
3
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
  from office365.runtime.types.collections import StringCollection
5
5
  from office365.sharepoint.entity import Entity
6
+ from office365.sharepoint.tenant.administration.default_time_zone_id import (
7
+ TenantDefaultTimeZoneId,
8
+ )
6
9
  from office365.sharepoint.tenant.administration.smtp_server import SmtpServer
7
10
  from office365.sharepoint.tenant.administration.types import (
8
11
  AutoQuotaEnabled,
9
12
  DisableGroupify,
13
+ DisableSelfServiceSiteCreation,
14
+ EnableAutoNewsDigest,
10
15
  )
11
16
 
12
17
 
13
18
  class TenantAdminSettingsService(Entity):
14
- """"""
19
+ """Manage various tenant-level settings related to SharePoint administration"""
15
20
 
16
21
  def __init__(self, context):
17
22
  static_path = ResourcePath(
@@ -20,7 +25,7 @@ class TenantAdminSettingsService(Entity):
20
25
  super(TenantAdminSettingsService, self).__init__(context, static_path)
21
26
 
22
27
  def get_tenant_sharing_status(self):
23
- """"""
28
+ """Retrieves the current state of sharing settings for a tenant"""
24
29
  return_type = ClientResult(self.context, int())
25
30
  qry = ServiceOperationQuery(
26
31
  self, "GetTenantSharingStatus", None, None, None, return_type
@@ -38,21 +43,44 @@ class TenantAdminSettingsService(Entity):
38
43
 
39
44
  @property
40
45
  def available_managed_paths_for_site_creation(self):
41
- """"""
46
+ """
47
+ Specifies the managed paths that are available for the creation of new SharePoint sites within a tenant.
48
+ """
42
49
  return self.properties.get(
43
50
  "AvailableManagedPathsForSiteCreation", StringCollection()
44
51
  )
45
52
 
46
53
  @property
47
54
  def disable_groupify(self):
48
- """"""
55
+ """
56
+ Controls whether SharePoint site owners in your tenant are allowed to convert classic SharePoint sites into
57
+ Microsoft 365 Groups (a process commonly known as "groupifying" a site)
58
+ """
49
59
  return self.properties.get("DisableGroupify", DisableGroupify())
50
60
 
61
+ @property
62
+ def disable_self_service_site_creation(self):
63
+ """ " """
64
+ return self.properties.get(
65
+ "DisableSelfServiceSiteCreation", DisableSelfServiceSiteCreation()
66
+ )
67
+
68
+ @property
69
+ def enable_auto_news_digest(self):
70
+ """ " """
71
+ return self.properties.get("EnableAutoNewsDigest", EnableAutoNewsDigest())
72
+
51
73
  @property
52
74
  def smtp_server(self):
53
- """"""
75
+ """Specifies the server address or endpoint of the SMTP server that SharePoint Online or tenant-related
76
+ services use for sending emails"""
54
77
  return self.properties.get("SmtpServer", SmtpServer())
55
78
 
79
+ @property
80
+ def tenant_default_time_zone_id(self):
81
+ """Default time zone configured for a SharePoint Online tenant"""
82
+ return self.properties.get("TenantDefaultTimeZoneId", TenantDefaultTimeZoneId())
83
+
56
84
  @property
57
85
  def entity_type_name(self):
58
86
  return "Microsoft.Online.SharePoint.TenantAdministration.TenantAdminSettingsService"
@@ -61,7 +89,12 @@ class TenantAdminSettingsService(Entity):
61
89
  if default_value is None:
62
90
  property_mapping = {
63
91
  "AvailableManagedPathsForSiteCreation": self.available_managed_paths_for_site_creation,
92
+ "AutoQuotaEnabled": self.auto_quota_enabled,
93
+ "DisableGroupify": self.disable_groupify,
94
+ "DisableSelfServiceSiteCreation": self.disable_self_service_site_creation,
95
+ "EnableAutoNewsDigest": self.enable_auto_news_digest,
64
96
  "SmtpServer": self.smtp_server,
97
+ "TenantDefaultTimeZoneId": self.tenant_default_time_zone_id,
65
98
  }
66
99
  default_value = property_mapping.get(name, None)
67
100
  return super(TenantAdminSettingsService, self).get_property(name, default_value)
@@ -1,9 +1,12 @@
1
+ from datetime import datetime
1
2
  from typing import Optional
2
3
 
3
4
  from office365.onedrive.listitems.list_item import ListItem
5
+ from office365.runtime.client_value_collection import ClientValueCollection
4
6
  from office365.runtime.paths.service_operation import ServiceOperationPath
5
7
  from office365.runtime.paths.v3.entity import EntityPath
6
8
  from office365.runtime.queries.service_operation import ServiceOperationQuery
9
+ from office365.runtime.types.collections import StringCollection
7
10
  from office365.sharepoint.client_context import ClientContext
8
11
  from office365.sharepoint.entity import Entity
9
12
  from office365.sharepoint.internal.paths.static_operation import StaticOperationPath
@@ -11,6 +14,7 @@ from office365.sharepoint.tenant.administration.deny_add_and_customize_pages_sta
11
14
  DenyAddAndCustomizePagesStatus,
12
15
  )
13
16
  from office365.sharepoint.tenant.administration.spo_operation import SpoOperation
17
+ from office365.sharepoint.translation.resource_entry import SPResourceEntry
14
18
 
15
19
 
16
20
  class SiteProperties(Entity):
@@ -96,6 +100,38 @@ class SiteProperties(Entity):
96
100
  """Gets site version policy for new document libraries."""
97
101
  return self.properties.get("ArchivedBy", None)
98
102
 
103
+ @property
104
+ def archived_time(self):
105
+ # type: () -> Optional[datetime]
106
+ """Gets the time when site was archived."""
107
+ return self.properties.get("ArchivedTime", datetime.min)
108
+
109
+ @property
110
+ def block_download_links_file_type(self):
111
+ # type: () -> Optional[int]
112
+ """Block downloads for view-only files in SharePoint and OneDrive."""
113
+ return self.properties.get("BlockDownloadLinksFileType", None)
114
+
115
+ @property
116
+ def block_download_microsoft365_group_ids(self):
117
+ # type: () -> Optional[StringCollection]
118
+ """Block downloads for view-only files in SharePoint and OneDrive."""
119
+ return self.properties.get(
120
+ "BlockDownloadMicrosoft365GroupIds", StringCollection()
121
+ )
122
+
123
+ @property
124
+ def block_download_policy_file_type_ids(self):
125
+ # type: () -> Optional[StringCollection]
126
+ """"""
127
+ return self.properties.get("BlockDownloadPolicyFileTypeIds", StringCollection())
128
+
129
+ @property
130
+ def created_time(self):
131
+ # type: () -> Optional[datetime]
132
+ """Gets the time when the site was created."""
133
+ return self.properties.get("CreatedTime", datetime.min)
134
+
99
135
  @property
100
136
  def deny_add_and_customize_pages(self):
101
137
  # type: () -> Optional[int]
@@ -110,6 +146,38 @@ class SiteProperties(Entity):
110
146
  """Sets the status of the [DenyAddAndCustomizePages] feature on a site collection."""
111
147
  self.set_property("DenyAddAndCustomizePages", value)
112
148
 
149
+ @property
150
+ def last_content_modified_date(self):
151
+ # type: () -> Optional[datetime]
152
+ """Gets the last time content was modified on the site."""
153
+ return self.properties.get("LastContentModifiedDate", datetime.min)
154
+
155
+ @property
156
+ def group_owner_login_name(self):
157
+ # type: () -> Optional[str]
158
+ """Gets the Group Owner login name."""
159
+ return self.properties.get("GroupOwnerLoginName", None)
160
+
161
+ @property
162
+ def is_hub_site(self):
163
+ # type: () -> Optional[bool]
164
+ """"""
165
+ return self.properties.get("IsHubSite", None)
166
+
167
+ @property
168
+ def title(self):
169
+ # type: () -> Optional[str]
170
+ """Site title"""
171
+ return self.properties.get("Title", None)
172
+
173
+ @property
174
+ def title_translations(self):
175
+ # type: () -> Optional[str]
176
+ """Site titles"""
177
+ return self.properties.get(
178
+ "TitleTranslations", ClientValueCollection(SPResourceEntry)
179
+ )
180
+
113
181
  @property
114
182
  def owner_login_name(self):
115
183
  # type: () -> Optional[str]
@@ -173,6 +241,16 @@ class SiteProperties(Entity):
173
241
  # type: () -> str
174
242
  return "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties"
175
243
 
244
+ def get_property(self, name, default_value=None):
245
+ if default_value is None:
246
+ property_mapping = {
247
+ "ArchivedTime": self.archived_time,
248
+ "CreatedTime": self.created_time,
249
+ "LastContentModifiedDate": self.last_content_modified_date,
250
+ }
251
+ default_value = property_mapping.get(name, None)
252
+ return super(SiteProperties, self).get_property(name, default_value)
253
+
176
254
  def set_property(self, name, value, persist_changes=True):
177
255
  super(SiteProperties, self).set_property(name, value, persist_changes)
178
256
  # fallback: create a new resource path
@@ -1,6 +1,10 @@
1
1
  from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value_collection import ClientValueCollection
2
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
3
4
  from office365.sharepoint.entity_collection import EntityCollection
5
+ from office365.sharepoint.tenant.administration.site_user_group_info import (
6
+ SiteUserGroupInfo,
7
+ )
4
8
  from office365.sharepoint.tenant.administration.sites.properties import SiteProperties
5
9
  from office365.sharepoint.tenant.administration.sites.state_properties import (
6
10
  SiteStateProperties,
@@ -48,6 +52,21 @@ class SitePropertiesCollection(EntityCollection[SiteProperties]):
48
52
  self.context.add_query(qry)
49
53
  return return_type
50
54
 
55
+ def get_site_user_groups(self, site_id):
56
+ """
57
+ Gets site user groups.
58
+
59
+ :param str site_id: Site identifier
60
+ """
61
+ return_type = ClientResult(
62
+ self.context, ClientValueCollection(SiteUserGroupInfo)
63
+ )
64
+ qry = ServiceOperationQuery(
65
+ self, "GetSiteUserGroups", [site_id], None, None, return_type
66
+ )
67
+ self.context.add_query(qry)
68
+ return return_type
69
+
51
70
  def check_site_is_archived_by_id(self, site_id):
52
71
  """
53
72
  :param str site_id: Site identifier