Office365-REST-Python-Client 2.6.0__py3-none-any.whl → 2.6.2__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 (234) hide show
  1. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +20 -29
  2. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +233 -156
  3. office365/admin/people_settings.py +16 -0
  4. office365/admin/sharepoint_settings.py +50 -1
  5. office365/admin/sharing_capabilities.py +2 -0
  6. office365/communications/calls/participant.py +6 -0
  7. office365/communications/onlinemeetings/broadcast_settings.py +5 -0
  8. office365/communications/onlinemeetings/collection.py +29 -0
  9. office365/communications/onlinemeetings/online_meeting.py +1 -1
  10. office365/communications/onlinemeetings/recordings/call.py +5 -0
  11. office365/communications/onlinemeetings/restricted.py +5 -0
  12. office365/directory/applications/collection.py +11 -0
  13. office365/directory/audit/directory.py +31 -0
  14. office365/directory/audit/signins/signin.py +14 -0
  15. office365/directory/audit/target_resource.py +5 -0
  16. office365/directory/authentication/conditions/conditions.py +5 -1
  17. office365/directory/datapolicy/operation.py +39 -0
  18. office365/directory/directory.py +13 -0
  19. office365/directory/identitygovernance/accessreview/instance.py +29 -0
  20. office365/directory/identitygovernance/accessreview/stage.py +13 -0
  21. office365/directory/identitygovernance/accessreview/stages.py +11 -0
  22. office365/directory/identitygovernance/appconsent/request.py +9 -0
  23. office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
  24. office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
  25. office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
  26. office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
  27. office365/directory/insights/trending.py +25 -0
  28. office365/directory/licenses/assignment_state.py +5 -5
  29. office365/directory/licenses/details.py +6 -0
  30. office365/directory/permissions/scoped_role_membership.py +8 -0
  31. office365/directory/policies/applied_conditional_access.py +31 -0
  32. office365/directory/policies/feature_rollout.py +24 -0
  33. office365/directory/protection/information.py +73 -2
  34. office365/directory/protection/riskyusers/collection.py +1 -1
  35. office365/directory/protection/threatassessment/requests/__init__.py +0 -0
  36. office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
  37. office365/directory/protection/threatassessment/requests/file.py +10 -0
  38. office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
  39. office365/directory/protection/threatassessment/requests/url.py +9 -0
  40. office365/directory/rolemanagement/app_scope.py +14 -0
  41. office365/directory/rolemanagement/application.py +3 -2
  42. office365/directory/rolemanagement/role.py +15 -0
  43. office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
  44. office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
  45. office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
  46. office365/directory/security/alerts/file_security_state.py +5 -0
  47. office365/directory/security/attacksimulations/automation.py +8 -0
  48. office365/directory/security/attacksimulations/automation_run.py +8 -0
  49. office365/directory/security/attacksimulations/repeat_offender.py +7 -0
  50. office365/directory/security/attacksimulations/report.py +2 -2
  51. office365/directory/security/attacksimulations/user.py +5 -0
  52. office365/directory/security/incidents/incident.py +6 -1
  53. office365/directory/security/security.py +5 -0
  54. office365/directory/subscriptions/__init__.py +0 -0
  55. office365/directory/subscriptions/company.py +7 -0
  56. office365/directory/synchronization/progress.py +12 -0
  57. office365/directory/users/activities/activity.py +10 -1
  58. office365/directory/users/settings.py +51 -1
  59. office365/directory/users/storage.py +5 -0
  60. office365/directory/users/user.py +114 -3
  61. office365/entity_collection.py +21 -0
  62. office365/onedrive/contenttypes/collection.py +2 -0
  63. office365/onedrive/driveitems/driveItem.py +3 -2
  64. office365/onedrive/driveitems/publication_facet.py +6 -1
  65. office365/onedrive/filestorage/container.py +22 -0
  66. office365/onedrive/filestorage/container_collection.py +37 -0
  67. office365/onedrive/filestorage/file_storage.py +4 -4
  68. office365/onedrive/listitems/collection.py +38 -0
  69. office365/onedrive/lists/list.py +3 -5
  70. office365/onedrive/sitepages/base.py +8 -0
  71. office365/onedrive/sitepages/collection.py +8 -2
  72. office365/onedrive/sitepages/site_page.py +13 -2
  73. office365/onedrive/sites/site.py +1 -1
  74. office365/onedrive/workbooks/charts/title.py +12 -0
  75. office365/onedrive/workbooks/charts/title_format.py +5 -0
  76. office365/onedrive/workbooks/functions/functions.py +16 -0
  77. office365/onedrive/workbooks/ranges/border.py +30 -0
  78. office365/onedrive/workbooks/ranges/font.py +39 -0
  79. office365/onedrive/workbooks/ranges/range.py +6 -0
  80. office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
  81. office365/outlook/calendar/events/event.py +57 -0
  82. office365/outlook/mail/automatic_replies_mailtips.py +20 -0
  83. office365/outlook/mail/folders/folder.py +3 -4
  84. office365/outlook/mail/messages/message.py +21 -4
  85. office365/outlook/mail/messages/rules/collection.py +26 -0
  86. office365/outlook/mail/tips/__init__.py +0 -0
  87. office365/outlook/mail/tips/error.py +5 -0
  88. office365/outlook/mail/tips/tips.py +41 -0
  89. office365/outlook/people/__init__.py +0 -0
  90. office365/outlook/people/profile_card_property.py +15 -0
  91. office365/outlook/person.py +7 -0
  92. office365/planner/category_descriptions.py +6 -0
  93. office365/planner/external_references.py +7 -0
  94. office365/planner/planner.py +4 -4
  95. office365/planner/plans/container.py +12 -0
  96. office365/planner/plans/details.py +31 -0
  97. office365/planner/tasks/collection.py +37 -0
  98. office365/planner/tasks/task.py +24 -0
  99. office365/planner/tasks/task_details.py +34 -1
  100. office365/planner/user_ids.py +8 -0
  101. office365/reports/internal/queries/create_report_query.py +12 -3
  102. office365/reports/root.py +61 -2
  103. office365/runtime/auth/authentication_context.py +10 -1
  104. office365/runtime/auth/providers/saml_token_provider.py +5 -13
  105. office365/runtime/auth/sts_profile.py +35 -18
  106. office365/runtime/client_object.py +1 -1
  107. office365/runtime/client_object_collection.py +3 -5
  108. office365/runtime/client_result.py +3 -3
  109. office365/runtime/client_runtime_context.py +2 -2
  110. office365/runtime/odata/json_format.py +14 -3
  111. office365/runtime/odata/request.py +1 -3
  112. office365/runtime/odata/v3/json_light_format.py +18 -0
  113. office365/runtime/odata/v4/json_format.py +19 -0
  114. office365/runtime/queries/client_query.py +13 -8
  115. office365/runtime/queries/create_entity.py +7 -5
  116. office365/runtime/queries/delete_entity.py +6 -2
  117. office365/runtime/queries/function.py +3 -4
  118. office365/runtime/queries/read_entity.py +3 -5
  119. office365/runtime/queries/service_operation.py +2 -7
  120. office365/search/acronyms/__init__.py +0 -0
  121. office365/search/answer.py +35 -0
  122. office365/search/bookmarks/__init__.py +0 -0
  123. office365/search/bookmarks/bookmark.py +7 -0
  124. office365/search/entity.py +81 -2
  125. office365/search/entity_type.py +6 -1
  126. office365/search/external/item.py +5 -0
  127. office365/search/identity_set.py +11 -0
  128. office365/search/qnas/__init__.py +0 -0
  129. office365/search/qnas/qna.py +9 -0
  130. office365/sharepoint/activities/client_response.py +2 -2
  131. office365/sharepoint/apps/launcher.py +9 -0
  132. office365/sharepoint/brandcenter/brand_center.py +26 -0
  133. office365/sharepoint/client_context.py +19 -1
  134. office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
  135. office365/sharepoint/compliance/store_proxy.py +75 -0
  136. office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
  137. office365/sharepoint/copilot/file_metadata.py +5 -0
  138. office365/sharepoint/fields/builtin_field_id.py +8 -0
  139. office365/sharepoint/files/collection.py +10 -0
  140. office365/sharepoint/files/file.py +24 -3
  141. office365/sharepoint/listitems/listitem.py +61 -3
  142. office365/sharepoint/lists/exporter.py +1 -0
  143. office365/sharepoint/lists/list.py +37 -3
  144. office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
  145. office365/sharepoint/migrationcenter/common/task.py +8 -0
  146. office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
  147. office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
  148. office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
  149. office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
  150. office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
  151. office365/sharepoint/migrationcenter/service/services.py +13 -1
  152. office365/sharepoint/migrationcenter/service/teams.py +11 -0
  153. office365/sharepoint/navigation/node.py +7 -16
  154. office365/sharepoint/policy/license_utilities.py +1 -0
  155. office365/sharepoint/portal/groups/creation_context.py +11 -0
  156. office365/sharepoint/portal/groups/service.py +1 -1
  157. office365/sharepoint/portal/groups/site_manager.py +1 -1
  158. office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
  159. office365/sharepoint/publishing/pages/3d/types.py +5 -0
  160. office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
  161. office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
  162. office365/sharepoint/publishing/pages/campaign/types.py +18 -0
  163. office365/sharepoint/publishing/pages/coauth_state.py +20 -0
  164. office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
  165. office365/sharepoint/publishing/pages/metadata.py +0 -10
  166. office365/sharepoint/publishing/pages/page.py +29 -0
  167. office365/sharepoint/publishing/pages/service.py +27 -6
  168. office365/sharepoint/publishing/pages/topics/collection.py +1 -1
  169. office365/sharepoint/request.py +6 -2
  170. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
  171. office365/sharepoint/sharing/access_request_settings.py +18 -0
  172. office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
  173. office365/sharepoint/sharing/information.py +2 -0
  174. office365/sharepoint/sharing/links/partial_success_response.py +4 -0
  175. office365/sharepoint/sites/azure_container_Info.py +4 -1
  176. office365/sharepoint/sites/brand_center_configuration.py +5 -0
  177. office365/sharepoint/sites/manager/__init__.py +0 -0
  178. office365/sharepoint/sites/manager/service.py +34 -0
  179. office365/sharepoint/sites/manager/types.py +5 -0
  180. office365/sharepoint/sites/site.py +54 -0
  181. office365/sharepoint/sites/themes.py +5 -0
  182. office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
  183. office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
  184. office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
  185. office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
  186. office365/sharepoint/tenant/administration/group.py +34 -0
  187. office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
  188. office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
  189. office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
  190. office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
  191. office365/sharepoint/tenant/administration/tenant.py +182 -5
  192. office365/sharepoint/userprofiles/people_manager.py +3 -1
  193. office365/sharepoint/utilities/utility.py +16 -0
  194. office365/sharepoint/webparts/definition.py +26 -0
  195. office365/sharepoint/webparts/limited_manager.py +53 -0
  196. office365/sharepoint/webparts/webpart.py +47 -0
  197. office365/sharepoint/webs/regional_settings.py +27 -0
  198. office365/sharepoint/webs/web.py +20 -1
  199. office365/teams/apps/app.py +17 -0
  200. office365/teams/apps/authorization.py +16 -0
  201. office365/teams/apps/permission_set.py +14 -0
  202. office365/teams/apps/resource_specific_permission.py +5 -0
  203. office365/teams/chats/chat.py +60 -0
  204. office365/teams/chats/messages/message.py +17 -0
  205. office365/teams/chats/type.py +13 -0
  206. office365/teams/chats/viewpoint.py +5 -0
  207. office365/teams/fun_settings.py +14 -2
  208. office365/teams/info.py +1 -1
  209. office365/teams/schedule/entity.py +3 -0
  210. office365/teams/schedule/shifts/item.py +1 -0
  211. office365/teams/schedule/shifts/offer/request.py +41 -1
  212. office365/teams/teamwork/activity_topic.py +5 -0
  213. office365/teams/teamwork/online_meeting_info.py +21 -0
  214. office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
  215. office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
  216. office365/teams/teamwork/user.py +48 -1
  217. office365/teams/teamwork/user_identity.py +5 -0
  218. office365/teams/viva/community.py +13 -0
  219. office365/teams/viva/employee_experience.py +27 -0
  220. office365/teams/viva/employee_experience_user.py +16 -0
  221. office365/teams/viva/learning/courses/self_initiated.py +5 -0
  222. office365/todo/attachments/task_file.py +3 -0
  223. office365/todo/checklist_item.py +11 -0
  224. office365/todo/tasks/list.py +11 -0
  225. office365/todo/tasks/task.py +31 -0
  226. office365/outlook/mail/tips.py +0 -17
  227. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
  228. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
  229. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
  230. /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
  231. /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
  232. /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
  233. /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
  234. /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.paths.resource_path import ResourcePath
2
4
  from office365.sharepoint.entity import Entity
3
5
  from office365.sharepoint.sharing.abilities import SharingAbilities
@@ -3,3 +3,7 @@ from office365.sharepoint.sharing.links.share_response import ShareLinkResponse
3
3
 
4
4
  class ShareLinkPartialSuccessResponse(ShareLinkResponse):
5
5
  """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "SP.Sharing.ShareLinkPartialSuccessResponse"
@@ -2,4 +2,7 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class ProvisionedTemporaryAzureContainerInfo(ClientValue):
5
- pass
5
+
6
+ def __init__(self, encryption_key=None, uri=None):
7
+ self.EncryptionKey = encryption_key
8
+ self.Uri = uri
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class BrandCenterConfiguration(ClientValue):
5
+ """ """
File without changes
@@ -0,0 +1,34 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.paths.resource_path import ResourcePath
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.entity import Entity
5
+ from office365.sharepoint.sites.manager.types import TopSiteFilesResult
6
+
7
+
8
+ class SiteManagerService(Entity):
9
+ """ """
10
+
11
+ def __init__(self, context):
12
+ static_path = ResourcePath(
13
+ "Microsoft.SharePoint.SiteManager.SiteManagerService"
14
+ )
15
+ super(SiteManagerService, self).__init__(context, static_path)
16
+
17
+ def top_files(self, max_count=None):
18
+ """ """
19
+ return_type = ClientResult(self.context, TopSiteFilesResult())
20
+ payload = {"maxCount": max_count}
21
+ qry = ServiceOperationQuery(
22
+ self,
23
+ "TopFiles",
24
+ None,
25
+ payload,
26
+ None,
27
+ return_type,
28
+ )
29
+ self.context.add_query(qry)
30
+ return return_type
31
+
32
+ @property
33
+ def entity_type_name(self):
34
+ return "Microsoft.SharePoint.SiteManager.SiteManagerService"
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TopSiteFilesResult(ClientValue):
5
+ """ """
@@ -57,6 +57,50 @@ class Site(Entity):
57
57
  def __init__(self, context, resource_path=None):
58
58
  super(Site, self).__init__(context, ResourcePath("Site", resource_path))
59
59
 
60
+ def create_migration_ingestion_job(
61
+ self,
62
+ g_web_id,
63
+ azure_container_source_uri,
64
+ azure_container_manifest_uri,
65
+ azure_queue_report_uri,
66
+ ingestion_task_key,
67
+ ):
68
+ """ """
69
+ return_type = ClientResult(self.context, str())
70
+ payload = {
71
+ "gWebId": g_web_id,
72
+ "azureContainerSourceUri": azure_container_source_uri,
73
+ "azureContainerManifestUri": azure_container_manifest_uri,
74
+ "azureQueueReportUri": azure_queue_report_uri,
75
+ "ingestionTaskKey": ingestion_task_key,
76
+ }
77
+ qry = ServiceOperationQuery(
78
+ self, "CreateMigrationIngestionJob", None, payload, None, return_type
79
+ )
80
+ self.context.add_query(qry)
81
+ return return_type
82
+
83
+ def create_migration_job(
84
+ self,
85
+ g_web_id=None,
86
+ azure_container_source_uri=None,
87
+ azure_container_manifest_uri=None,
88
+ azure_queue_report_uri=None,
89
+ ):
90
+ """ """
91
+ return_type = ClientResult(self.context, str())
92
+ payload = {
93
+ "gWebId": g_web_id,
94
+ "azureContainerSourceUri": azure_container_source_uri,
95
+ "azureContainerManifestUri": azure_container_manifest_uri,
96
+ "azureQueueReportUri": azure_queue_report_uri,
97
+ }
98
+ qry = ServiceOperationQuery(
99
+ self, "CreateMigrationJob", None, payload, None, return_type
100
+ )
101
+ self.context.add_query(qry)
102
+ return return_type
103
+
60
104
  def create_preview_site(self, upgrade=None, sendemail=None):
61
105
  """
62
106
  Schedules the creation of an evaluation copy of the site collection for the purposes of evaluating an upgrade
@@ -411,6 +455,16 @@ class Site(Entity):
411
455
  context.add_query(qry)
412
456
  return return_type
413
457
 
458
+ def is_deletable(self):
459
+ """"""
460
+ return_type = ClientResult(self.context, bool())
461
+
462
+ def _is_site_deletable():
463
+ SPPolicyStoreProxy.is_site_deletable(self.context, self.url, return_type)
464
+
465
+ self.ensure_property("Url", _is_site_deletable)
466
+ return return_type
467
+
414
468
  def get_catalog(self, type_catalog):
415
469
  """
416
470
  Specifies the list template gallery, site template gallery, Web Part gallery, master page gallery,
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SiteThemes(ClientValue):
5
+ """ """
@@ -7,6 +7,12 @@ from office365.sharepoint.entity import Entity
7
7
  class StorageMetrics(Entity):
8
8
  """Specifies the storage-related metrics for list folders in the site"""
9
9
 
10
+ @property
11
+ def additional_file_stream_size(self):
12
+ # type: () -> Optional[int]
13
+ """ """
14
+ return self.properties.get("AdditionalFileStreamSize", None)
15
+
10
16
  @property
11
17
  def last_modified(self):
12
18
  # type: () -> Optional[datetime.datetime]
@@ -41,3 +47,15 @@ class StorageMetrics(Entity):
41
47
  Total size for a file/folder includes stream, version, and metadata sizes.
42
48
  """
43
49
  return self.properties.get("TotalSize", None)
50
+
51
+ @property
52
+ def version_count(self):
53
+ # type: () -> Optional[int]
54
+ """ """
55
+ return self.properties.get("VersionCount", None)
56
+
57
+ @property
58
+ def version_size(self):
59
+ # type: () -> Optional[int]
60
+ """ """
61
+ return self.properties.get("VersionSize", None)
@@ -0,0 +1,42 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.runtime.paths.service_operation import ServiceOperationPath
4
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
5
+ from office365.sharepoint.client_context import ClientContext
6
+ from office365.sharepoint.tenant.administration.copilot.agentinsights.report_metadata import (
7
+ SPOCopilotAgentInsightsReportMetadata,
8
+ )
9
+ from office365.sharepoint.tenant.administration.datagovernance.client_base import (
10
+ SPDataGovernanceRestApiClientBase,
11
+ )
12
+
13
+
14
+ class SPOCopilotAgentInsightsRestApiClient(SPDataGovernanceRestApiClientBase):
15
+ """"""
16
+
17
+ def __init__(self, context, authorization_header, url, user_agent):
18
+ # type: (ClientContext, str, str, str) -> None
19
+ static_path = ServiceOperationPath(
20
+ "Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightRestApiClient",
21
+ {
22
+ "authorizationHeader": authorization_header,
23
+ "url": url,
24
+ "userAgent": user_agent,
25
+ },
26
+ )
27
+ super(SPOCopilotAgentInsightsRestApiClient, self).__init__(context, static_path)
28
+
29
+ def get_all_copilot_agent_insights_reports_metadata(self):
30
+ return_type = ClientResult(
31
+ self.context, ClientValueCollection(SPOCopilotAgentInsightsReportMetadata)
32
+ )
33
+ qry = ServiceOperationQuery(
34
+ self,
35
+ "GetAllCopilotAgentInsightsReportsMetadata",
36
+ None,
37
+ None,
38
+ None,
39
+ return_type,
40
+ )
41
+ self.context.add_query(qry)
42
+ return return_type
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SPOCopilotAgentInsightsReportMetadata(ClientValue):
5
+ """"""
@@ -1,7 +1,18 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value import ClientValue
1
3
  from office365.runtime.paths.resource_path import ResourcePath
4
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
2
5
  from office365.sharepoint.entity import Entity
3
6
 
4
7
 
8
+ class GroupInfo(ClientValue):
9
+ """"""
10
+
11
+ @property
12
+ def entity_type_name(self):
13
+ return "Microsoft.Online.SharePoint.TenantAdministration.GroupInfo"
14
+
15
+
5
16
  class SPOGroup(Entity):
6
17
  """ """
7
18
 
@@ -12,6 +23,29 @@ class SPOGroup(Entity):
12
23
  )
13
24
  super(SPOGroup, self).__init__(context, resource_path)
14
25
 
26
+ def add_as_group_owner_and_member(self, group_id, user_id, user_principal_name):
27
+ """ """
28
+ payload = {
29
+ "groupId": group_id,
30
+ "userId": user_id,
31
+ "userPrincipalName": user_principal_name,
32
+ }
33
+ qry = ServiceOperationQuery(
34
+ self, "AddAsGroupOwnerAndMember", None, payload, None
35
+ )
36
+ self.context.add_query(qry)
37
+ return self
38
+
39
+ def get_group_info(self, group_id):
40
+ """"""
41
+ return_type = ClientResult(self.context, GroupInfo())
42
+ payload = {"groupId": group_id}
43
+ qry = ServiceOperationQuery(
44
+ self, "GetGroupInfo", None, payload, None, return_type
45
+ )
46
+ self.context.add_query(qry)
47
+ return return_type
48
+
15
49
  @property
16
50
  def entity_type_name(self):
17
51
  return "Microsoft.Online.SharePoint.TenantAdministration.SPOGroup"
@@ -0,0 +1,17 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SPOFileVersionPolicySettings(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPOFileVersionPolicySettings"
10
+
11
+
12
+ class SPOFileVersionBatchDeleteJobProgress(ClientValue):
13
+ """"""
14
+
15
+ @property
16
+ def entity_type_name(self):
17
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPOFileVersionBatchDeleteJobProgress"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SPOListParameters(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.TenantAdministration.SPOListParameters"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PolicyResourceStorage(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Administration.TenantAdmin.PolicyResourceStorage"
@@ -10,6 +10,9 @@ class SitePropertiesEnumerableFilter(ClientValue):
10
10
  include_personal_site=None,
11
11
  group_id_defined=None,
12
12
  template=None,
13
+ archived_by=None,
14
+ archived_time=None,
15
+ archive_status=None,
13
16
  ):
14
17
  """
15
18
  :param str _filter:
@@ -20,12 +23,15 @@ class SitePropertiesEnumerableFilter(ClientValue):
20
23
  :param str template:
21
24
  """
22
25
  super(SitePropertiesEnumerableFilter, self).__init__()
26
+ self.ArchivedBy = archived_by
23
27
  self.Filter = _filter
24
28
  self.GroupIdDefined = group_id_defined
25
29
  self.IncludeDetail = include_detail
26
30
  self.IncludePersonalSite = include_personal_site
27
31
  self.StartIndex = start_index
28
32
  self.Template = template
33
+ self.ArchivedTime = archived_time
34
+ self.ArchiveStatus = archive_status
29
35
 
30
36
  @property
31
37
  def entity_type_name(self):
@@ -37,9 +37,16 @@ from office365.sharepoint.tenant.administration.insights.top_files_sharing impor
37
37
  from office365.sharepoint.tenant.administration.policies.app_billing_properties import (
38
38
  SPOAppBillingProperties,
39
39
  )
40
+ from office365.sharepoint.tenant.administration.policies.content_security_configuration import (
41
+ SPOContentSecurityPolicyConfiguration,
42
+ )
40
43
  from office365.sharepoint.tenant.administration.policies.definition import (
41
44
  TenantAdminPolicyDefinition,
42
45
  )
46
+ from office365.sharepoint.tenant.administration.policies.file_version_types import (
47
+ SPOFileVersionBatchDeleteJobProgress,
48
+ SPOFileVersionPolicySettings,
49
+ )
43
50
  from office365.sharepoint.tenant.administration.powerapps.environment import (
44
51
  PowerAppsEnvironment,
45
52
  )
@@ -221,6 +228,15 @@ class Tenant(Entity):
221
228
  self.context.add_query(qry)
222
229
  return return_type
223
230
 
231
+ def get_content_security_policy(self):
232
+ """"""
233
+ return_type = SPOContentSecurityPolicyConfiguration(self.context)
234
+ qry = ServiceOperationQuery(
235
+ self, "GetContentSecurityPolicy", None, None, None, return_type
236
+ )
237
+ self.context.add_query(qry)
238
+ return return_type
239
+
224
240
  def get_spo_app_billing_policies(self):
225
241
  """ """
226
242
  return_type = ClientResult(
@@ -310,6 +326,32 @@ class Tenant(Entity):
310
326
  self.context.add_query(qry)
311
327
  return return_type
312
328
 
329
+ def is_request_content_management_assessment_eligible(self):
330
+ return_type = ClientResult(self.context, bool())
331
+ qry = ServiceOperationQuery(
332
+ self,
333
+ "IsRequestContentManagementAssessmentEligible",
334
+ None,
335
+ None,
336
+ None,
337
+ return_type,
338
+ )
339
+ self.context.add_query(qry)
340
+ return return_type
341
+
342
+ def is_syntex_repository_terms_of_service_accepted(self):
343
+ return_type = ClientResult(self.context, bool())
344
+ qry = ServiceOperationQuery(
345
+ self,
346
+ "IsSyntexRepositoryTermsOfServiceAccepted",
347
+ None,
348
+ None,
349
+ None,
350
+ return_type,
351
+ )
352
+ self.context.add_query(qry)
353
+ return return_type
354
+
313
355
  def export_to_csv(
314
356
  self, view_xml=None, time_zone_id=None, columns_info=None, list_name=None
315
357
  ):
@@ -398,6 +440,20 @@ class Tenant(Entity):
398
440
  self.context.add_query(qry)
399
441
  return return_type
400
442
 
443
+ def get_root_site_url(self):
444
+ """ """
445
+ return_type = ClientResult(self.context, str())
446
+ qry = ServiceOperationQuery(
447
+ self,
448
+ "GetRootSiteUrl",
449
+ None,
450
+ None,
451
+ None,
452
+ return_type,
453
+ )
454
+ self.context.add_query(qry)
455
+ return return_type
456
+
401
457
  def get_site_authorization_code_for_migration(self, endpoint_url):
402
458
  return_type = ClientResult(self.context, str())
403
459
  payload = {"endpointUrl": endpoint_url}
@@ -714,9 +770,53 @@ class Tenant(Entity):
714
770
  self.context.add_query(qry)
715
771
  return return_type
716
772
 
773
+ def restore_deleted_site_by_id(self, site_id):
774
+ """Restores deleted site with the specified URL
775
+ :param str site_id: A string representing the site identifier.
776
+ """
777
+ return_type = SpoOperation(self.context)
778
+ qry = ServiceOperationQuery(
779
+ self, "RestoreDeletedSiteById", [site_id], None, None, return_type
780
+ )
781
+ self.context.add_query(qry)
782
+ return return_type
783
+
784
+ def get_file_version_policy_for_library(self, site_url, list_params=None):
785
+ """ """
786
+ return_type = ClientResult(self.context, SPOFileVersionPolicySettings())
787
+ payload = {"siteUrl": site_url, "listParams": list_params}
788
+ qry = ServiceOperationQuery(
789
+ self,
790
+ "GetFileVersionPolicyForLibrary",
791
+ None,
792
+ payload,
793
+ None,
794
+ return_type,
795
+ )
796
+ self.context.add_query(qry)
797
+ return return_type
798
+
799
+ def get_file_version_batch_delete_job_progress_for_library(
800
+ self, site_url, list_params
801
+ ):
802
+ """Gets the progress of the file version batch delete job for the specified site and list parameters."""
803
+ return_type = ClientResult(self.context, SPOFileVersionBatchDeleteJobProgress())
804
+ payload = {"siteUrl": site_url, "listParams": list_params}
805
+ qry = ServiceOperationQuery(
806
+ self,
807
+ "GetFileVersionBatchDeleteJobProgressForLibrary",
808
+ None,
809
+ payload,
810
+ None,
811
+ return_type,
812
+ )
813
+ self.context.add_query(qry)
814
+ return return_type
815
+
717
816
  def get_site_properties_by_site_id(self, site_id, include_detail=False):
718
817
  # type: (str, bool) -> SiteProperties
719
- """
818
+ """Gets the site properties for the specified site ID.
819
+
720
820
  :param str site_id: A string that represents the site identifier.
721
821
  :param bool include_detail: A Boolean value that indicates whether to include all of the SPSite properties.
722
822
  """
@@ -733,6 +833,8 @@ class Tenant(Entity):
733
833
  def get_site_properties_by_url(self, url, include_detail=False):
734
834
  # type: (str, bool) -> SiteProperties
735
835
  """
836
+ Gets the site properties for the specified URL.
837
+
736
838
  :param str url: A string that represents the site URL.
737
839
  :param bool include_detail: A Boolean value that indicates whether to include all of the SPSite properties.
738
840
  """
@@ -798,15 +900,84 @@ class Tenant(Entity):
798
900
  self.context.add_query(qry)
799
901
  return self
800
902
 
801
- def send_email(self, site_url):
802
- # type: (str) -> ClientResult[bool]
803
- """ """
903
+ def export_unlicensed_one_drive_for_business_list_to_csv(self):
904
+ """Exports a list of OneDrive for Business sites that are associated with unlicensed users into a CSV file"""
905
+ return_type = ClientResult(self.context, str())
906
+ qry = ServiceOperationQuery(
907
+ self, "ExportUnlicensedOneDriveForBusinessListToCSV"
908
+ )
909
+ self.context.add_query(qry)
910
+ return return_type
911
+
912
+ def send_email(self, site_url, activity_event_json):
913
+ # type: (str, str) -> ClientResult[bool]
914
+ """Send Email"""
804
915
  return_type = ClientResult(self.context, bool())
805
- payload = {"siteUrl": site_url}
916
+ payload = {"siteUrl": site_url, "activityEventJson": activity_event_json}
806
917
  qry = ServiceOperationQuery(self, "SendEmail", None, payload, None, return_type)
807
918
  self.context.add_query(qry)
808
919
  return return_type
809
920
 
921
+ def set_copilot_promo_optin_status(self, copilot_promo_optin_enabled):
922
+ # type: (bool) -> ClientResult[bool]
923
+ """ """
924
+ payload = {"copilotPromoOptInEnabled": copilot_promo_optin_enabled}
925
+ qry = ServiceOperationQuery(self, "SetCopilotPromoOptInStatus", None, payload)
926
+ self.context.add_query(qry)
927
+ return self
928
+
929
+ def set_default_view(self, view_id, list_name):
930
+ # type: (str, str) -> Self
931
+ """ """
932
+ payload = {"viewId": view_id, "listName": list_name}
933
+ qry = ServiceOperationQuery(self, "SetDefaultView", None, payload)
934
+ self.context.add_query(qry)
935
+ return self
936
+
937
+ def get_file_version_policy(self):
938
+ return_type = ClientResult(self.context, str())
939
+
940
+ def _get_file_version_policy():
941
+ return_type.set_property("__value", self.file_version_policy_xml)
942
+
943
+ self.ensure_property("FileVersionPolicyXml", _get_file_version_policy)
944
+ return return_type
945
+
946
+ def set_file_version_policy(
947
+ self, is_auto_trim_enabled, major_version_limit, expire_versions_after_days
948
+ ):
949
+ """
950
+ Automatically delete older versions of documents after a specified number of days.
951
+ Specify the maximum number of major versions to retain and the number of major versions
952
+ for which all minor versions will be kept.
953
+
954
+ :param bool is_auto_trim_enabled: If true, versions are trimmed automatically.
955
+ :param int major_version_limit: Retains only many major versions.
956
+ :param int expire_versions_after_days: Deletes versions older than this many days.
957
+ """
958
+ payload = {
959
+ "isAutoTrimEnabled": is_auto_trim_enabled,
960
+ "majorVersionLimit": major_version_limit,
961
+ "expireVersionsAfterDays": expire_versions_after_days,
962
+ }
963
+ qry = ServiceOperationQuery(self, "SetFileVersionPolicy", None, payload)
964
+ self.context.add_query(qry)
965
+ return self
966
+
967
+ def clear_file_version_policy(self):
968
+ self.set_property("FileVersionPolicyXml", "")
969
+ self.update()
970
+ return self
971
+
972
+ @property
973
+ def app_service_principal(self):
974
+ """ """
975
+ from office365.sharepoint.tenant.administration.internal.appservice.principal import (
976
+ SPOWebAppServicePrincipal,
977
+ )
978
+
979
+ return SPOWebAppServicePrincipal(self.context)
980
+
810
981
  @property
811
982
  def admin_settings(self):
812
983
  """Manage various tenant-level settings related to SharePoint administration"""
@@ -897,6 +1068,12 @@ class Tenant(Entity):
897
1068
  """"""
898
1069
  return self.properties.get("DefaultContentCenterSite", SiteInfoForSitePicker())
899
1070
 
1071
+ @property
1072
+ def file_version_policy_xml(self):
1073
+ # type: () -> Optional[str]
1074
+ """ """
1075
+ return self.properties.get("FileVersionPolicyXml", None)
1076
+
900
1077
  @property
901
1078
  def information_barriers_suspension(self):
902
1079
  # type: () -> Optional[bool]
@@ -148,14 +148,16 @@ class PeopleManager(Entity):
148
148
  return self
149
149
 
150
150
  def get_user_profile_properties(self, user_or_name):
151
+ # type: (str|User) -> ClientResult[dict]
151
152
  """
152
153
  Gets the specified user profile properties for the specified user.
153
154
 
154
155
  :param str or User user_or_name: User or Login name of the specified user.
155
156
  """
156
- return_type = ClientResult(self.context)
157
+ return_type = ClientResult(self.context, {})
157
158
 
158
159
  def _user_resolved(account_name):
160
+ # type: (str) -> None
159
161
  params = {"accountName": account_name}
160
162
  qry = ServiceOperationQuery(
161
163
  self, "GetUserProfileProperties", params, None, None, return_type
@@ -144,6 +144,22 @@ class Utility(Entity):
144
144
  context.add_query(qry)
145
145
  return utility
146
146
 
147
+ @staticmethod
148
+ def unmark_discussion_as_featured(context, list_id, topic_ids):
149
+ """
150
+ This method is a static method.
151
+ :type context: office365.sharepoint.client_context.ClientContext
152
+ :type list_id: str
153
+ :type topic_ids: str
154
+ """
155
+ utility = Utility(context)
156
+ payload = {"listID": list_id, "topicIDs": topic_ids}
157
+ qry = ServiceOperationQuery(
158
+ utility, "UnmarkDiscussionAsFeatured", None, payload, None, None, True
159
+ )
160
+ context.add_query(qry)
161
+ return utility
162
+
147
163
  @staticmethod
148
164
  def expand_groups_to_principals(context, inputs, max_count=None, return_type=None):
149
165
  """