Office365-REST-Python-Client 2.4.2__py3-none-any.whl → 2.4.4__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 (411) hide show
  1. {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +65 -31
  2. {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +401 -259
  3. office365/base_item.py +27 -5
  4. office365/booking/business.py +7 -0
  5. office365/booking/currency.py +5 -0
  6. office365/booking/solutions_root.py +32 -0
  7. office365/communications/calls/invitation_participant_info.py +17 -1
  8. office365/communications/calls/options.py +9 -0
  9. office365/communications/onlinemeetings/provider_type.py +3 -0
  10. office365/communications/presences/presence.py +14 -0
  11. office365/communications/presences/status_message.py +12 -0
  12. office365/directory/administrative_unit.py +22 -0
  13. office365/directory/applications/collection.py +2 -1
  14. office365/directory/applications/roles/assignment.py +45 -5
  15. office365/directory/applications/roles/assignment_collection.py +8 -0
  16. office365/directory/applications/roles/role.py +6 -1
  17. office365/directory/audit/signins/activity.py +31 -0
  18. office365/directory/audit/signins/location.py +17 -0
  19. office365/directory/audit/signins/signin.py +33 -0
  20. office365/directory/authentication/authentication.py +9 -0
  21. office365/directory/authentication/methods/details.py +25 -0
  22. office365/directory/authentication/methods/email.py +16 -0
  23. office365/directory/authentication/methods/root.py +27 -0
  24. office365/directory/certificates/authority.py +6 -1
  25. office365/directory/extensions/extended_property.py +8 -1
  26. office365/directory/extensions/extension.py +1 -1
  27. office365/directory/extensions/extension_property.py +0 -3
  28. office365/directory/extensions/open_type.py +8 -0
  29. office365/directory/groups/collection.py +2 -4
  30. office365/directory/groups/group.py +18 -4
  31. office365/directory/identities/governance.py +2 -0
  32. office365/directory/identities/object_identity.py +3 -3
  33. office365/directory/insights/resource_reference.py +15 -0
  34. office365/directory/insights/shared.py +36 -0
  35. office365/directory/insights/sharing_detail.py +11 -0
  36. office365/directory/insights/trending.py +8 -0
  37. office365/directory/insights/usage_details.py +16 -0
  38. office365/directory/insights/used.py +30 -0
  39. office365/directory/invitations/invitation.py +33 -1
  40. office365/directory/licenses/assigned_plan.py +19 -1
  41. office365/directory/licenses/assignment_state.py +5 -0
  42. office365/directory/licenses/service_plan_info.py +4 -0
  43. office365/directory/licenses/subscribed_sku.py +41 -0
  44. office365/directory/licenses/units_detail.py +11 -0
  45. office365/directory/object.py +3 -1
  46. office365/directory/object_collection.py +3 -4
  47. office365/directory/password_credential.py +5 -1
  48. office365/directory/permissions/email_identity.py +5 -0
  49. office365/directory/permissions/grants/condition_set.py +26 -0
  50. office365/directory/permissions/grants/resource_specific.py +21 -0
  51. office365/directory/policies/authentication_flows.py +9 -0
  52. office365/directory/policies/authentication_strength.py +10 -0
  53. office365/directory/policies/authorization.py +8 -0
  54. office365/directory/policies/cross_tenant_access.py +5 -0
  55. office365/directory/policies/root.py +35 -2
  56. office365/directory/protection/information.py +5 -0
  57. office365/directory/protection/risk_detection.py +11 -0
  58. office365/directory/protection/riskyusers/activity.py +5 -0
  59. office365/directory/protection/riskyusers/collection.py +32 -0
  60. office365/directory/protection/riskyusers/history_item.py +20 -0
  61. office365/directory/protection/riskyusers/risky_user.py +26 -0
  62. office365/directory/protection/root.py +31 -0
  63. office365/directory/rolemanagement/application.py +35 -0
  64. office365/directory/{roles → rolemanagement}/management.py +8 -1
  65. office365/directory/{roles → rolemanagement}/role.py +14 -0
  66. office365/directory/{roles → rolemanagement}/template.py +8 -0
  67. office365/directory/rolemanagement/unified_role_assignment.py +45 -0
  68. office365/directory/rolemanagement/unified_role_definition.py +6 -0
  69. office365/directory/security/alerts/alert.py +21 -0
  70. office365/directory/security/alerts/history_state.py +5 -0
  71. office365/directory/security/attacksimulations/automation.py +21 -0
  72. office365/directory/security/attacksimulations/automation_run.py +5 -0
  73. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  74. office365/directory/security/attacksimulations/root.py +26 -0
  75. office365/directory/security/attacksimulations/simulation.py +17 -0
  76. office365/directory/security/cases/__init__.py +0 -0
  77. office365/directory/security/cases/ediscovery.py +6 -0
  78. office365/directory/security/cases/root.py +22 -0
  79. office365/directory/security/incidents/incident.py +67 -0
  80. office365/directory/security/security.py +10 -1
  81. office365/directory/serviceprincipals/service_principal.py +89 -4
  82. office365/directory/synchronization/__init__.py +0 -0
  83. office365/directory/synchronization/job.py +16 -0
  84. office365/directory/synchronization/progress.py +5 -0
  85. office365/directory/synchronization/status.py +13 -0
  86. office365/directory/synchronization/synchronization.py +24 -0
  87. office365/directory/tenant_information.py +17 -0
  88. office365/directory/tenant_relationship.py +21 -0
  89. office365/directory/users/activities/activity.py +45 -1
  90. office365/directory/users/collection.py +8 -0
  91. office365/directory/users/password_profile.py +18 -2
  92. office365/directory/users/user.py +254 -29
  93. office365/entity.py +3 -3
  94. office365/graph_client.py +64 -12
  95. office365/intune/audit/actor.py +5 -0
  96. office365/intune/audit/event.py +21 -24
  97. office365/intune/audit/event_collection.py +26 -0
  98. office365/intune/audit/property.py +5 -0
  99. office365/intune/audit/resource.py +11 -0
  100. office365/intune/brand.py +6 -0
  101. office365/intune/devices/compliance/__init__.py +0 -0
  102. office365/intune/devices/compliance/policy.py +6 -0
  103. office365/intune/devices/compliance/policy_state.py +5 -0
  104. office365/intune/devices/data.py +5 -0
  105. office365/intune/devices/detail.py +10 -0
  106. office365/intune/devices/enrollment/__init__.py +0 -0
  107. office365/intune/devices/enrollment/configuration.py +25 -0
  108. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  109. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  110. office365/intune/devices/managed.py +44 -3
  111. office365/intune/devices/management/__init__.py +0 -0
  112. office365/intune/devices/management/management.py +69 -0
  113. office365/intune/devices/management/reports/__init__.py +0 -0
  114. office365/intune/devices/management/reports/reports.py +5 -0
  115. office365/intune/devices/management/settings.py +18 -0
  116. office365/intune/organizations/branding.py +15 -0
  117. office365/intune/organizations/organization.py +14 -0
  118. office365/intune/printing/__init__.py +0 -0
  119. office365/intune/printing/base.py +11 -0
  120. office365/intune/printing/capabilities.py +5 -0
  121. office365/intune/printing/connectors/__init__.py +0 -0
  122. office365/intune/printing/connectors/connector.py +6 -0
  123. office365/intune/printing/operations/__init__.py +0 -0
  124. office365/intune/printing/print.py +24 -0
  125. office365/intune/printing/printer.py +6 -0
  126. office365/intune/printing/services/__init__.py +0 -0
  127. office365/intune/printing/services/endpoint.py +5 -0
  128. office365/intune/printing/services/service.py +17 -0
  129. office365/intune/printing/share.py +5 -0
  130. office365/intune/printing/shares/__init__.py +0 -0
  131. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  132. office365/intune/provisioned_plan.py +5 -1
  133. office365/intune/servicecommunications/__init__.py +0 -0
  134. office365/intune/servicecommunications/announcement.py +39 -0
  135. office365/intune/servicecommunications/announcement_base.py +5 -0
  136. office365/intune/servicecommunications/health/__init__.py +0 -0
  137. office365/intune/servicecommunications/health/health.py +7 -0
  138. office365/intune/servicecommunications/issues/__init__.py +0 -0
  139. office365/intune/servicecommunications/issues/issue.py +29 -0
  140. office365/intune/servicecommunications/messages/__init__.py +0 -0
  141. office365/intune/servicecommunications/messages/update.py +10 -0
  142. office365/intune/termsandconditions/__init__.py +0 -0
  143. office365/intune/vpp_token.py +10 -0
  144. office365/onedrive/admin.py +16 -0
  145. office365/onedrive/columns/content_approval_status.py +5 -0
  146. office365/onedrive/columns/datetime.py +15 -0
  147. office365/onedrive/columns/default_value.py +4 -0
  148. office365/onedrive/columns/definition.py +49 -3
  149. office365/onedrive/columns/definition_collection.py +17 -6
  150. office365/onedrive/columns/lookup.py +5 -1
  151. office365/onedrive/columns/types.py +13 -0
  152. office365/onedrive/contenttypes/content_type.py +8 -0
  153. office365/onedrive/driveitems/audio.py +12 -1
  154. office365/onedrive/driveitems/driveItem.py +147 -69
  155. office365/onedrive/driveitems/image.py +8 -1
  156. office365/onedrive/driveitems/item_preview_info.py +20 -2
  157. office365/onedrive/driveitems/remote_item.py +19 -4
  158. office365/onedrive/drives/drive.py +7 -1
  159. office365/onedrive/drives/quota.py +18 -0
  160. office365/onedrive/drives/recipient.py +4 -0
  161. office365/onedrive/files/system_info.py +8 -6
  162. office365/onedrive/folders/folder.py +3 -3
  163. office365/onedrive/internal/paths/children.py +1 -4
  164. office365/onedrive/internal/paths/shared.py +7 -2
  165. office365/onedrive/lists/collection.py +12 -6
  166. office365/onedrive/lists/list.py +13 -5
  167. office365/onedrive/operations/long_running.py +7 -0
  168. office365/onedrive/operations/pending.py +13 -0
  169. office365/onedrive/operations/pending_content_update.py +5 -0
  170. office365/onedrive/permissions/collection.py +5 -6
  171. office365/onedrive/permissions/sharing_link.py +16 -1
  172. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  173. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  174. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  175. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  176. office365/onedrive/sharepoint_settings.py +25 -0
  177. office365/onedrive/sites/sites_with_root.py +11 -1
  178. office365/onedrive/termstore/groups/collection.py +1 -1
  179. office365/onedrive/termstore/groups/group.py +1 -0
  180. office365/onedrive/termstore/sets/collection.py +1 -1
  181. office365/onenote/operations/operation.py +10 -1
  182. office365/onenote/resources/resource.py +1 -0
  183. office365/outlook/calendar/calendar.py +116 -6
  184. office365/outlook/calendar/dateTimeTimeZone.py +4 -0
  185. office365/outlook/calendar/email_address.py +7 -0
  186. office365/outlook/calendar/events/event.py +0 -4
  187. office365/outlook/calendar/events/reminder.py +22 -3
  188. office365/outlook/calendar/group.py +0 -2
  189. office365/outlook/calendar/location_constraint.py +16 -1
  190. office365/outlook/calendar/meetingtimes/activity_domain.py +10 -0
  191. office365/outlook/calendar/meetingtimes/suggestion.py +1 -1
  192. office365/outlook/calendar/meetingtimes/time_constraint.py +18 -0
  193. office365/outlook/calendar/permissions/__init__.py +0 -0
  194. office365/outlook/calendar/permissions/collection.py +24 -0
  195. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  196. office365/outlook/calendar/place.py +7 -0
  197. office365/outlook/calendar/role_type.py +17 -0
  198. office365/outlook/calendar/schedule/information.py +5 -4
  199. office365/outlook/calendar/schedule/item.py +20 -1
  200. office365/outlook/calendar/sharing_message.py +2 -2
  201. office365/outlook/calendar/time_zone_base.py +3 -0
  202. office365/outlook/calendar/working_hours.py +17 -1
  203. office365/outlook/contacts/collection.py +39 -0
  204. office365/outlook/contacts/contact.py +21 -11
  205. office365/outlook/geo_coordinates.py +20 -0
  206. office365/outlook/item.py +5 -4
  207. office365/outlook/locale_info.py +3 -0
  208. office365/outlook/mail/automatic_replies_setting.py +14 -0
  209. office365/outlook/mail/folders/folder.py +52 -3
  210. office365/outlook/mail/folders/search.py +11 -0
  211. office365/outlook/mail/importance.py +1 -0
  212. office365/outlook/mail/item_body.py +3 -0
  213. office365/outlook/mail/location.py +27 -2
  214. office365/outlook/mail/location_constraint_item.py +5 -0
  215. office365/outlook/mail/mailbox_settings.py +13 -1
  216. office365/outlook/mail/messages/collection.py +7 -0
  217. office365/outlook/mail/messages/followup_flag.py +21 -0
  218. office365/outlook/mail/messages/internet_header.py +16 -0
  219. office365/outlook/mail/messages/message.py +184 -6
  220. office365/outlook/mail/messages/rules/__init__.py +0 -0
  221. office365/outlook/mail/messages/rules/actions.py +38 -0
  222. office365/outlook/mail/messages/rules/predicates.py +5 -0
  223. office365/outlook/mail/messages/rules/rule.py +32 -0
  224. office365/outlook/mail/patterned_recurrence.py +14 -1
  225. office365/outlook/mail/physical_address.py +5 -1
  226. office365/outlook/mail/recipient.py +3 -0
  227. office365/outlook/mail/recurrence_pattern.py +18 -1
  228. office365/outlook/mail/recurrence_range.py +16 -2
  229. office365/outlook/timezone_information.py +3 -0
  230. office365/reports/root.py +28 -1
  231. office365/reports/security/__init__.py +0 -0
  232. office365/reports/security/root.py +21 -0
  233. office365/reports/userregistration/__init__.py +0 -0
  234. office365/reports/userregistration/method_count.py +17 -0
  235. office365/reports/userregistration/method_summary.py +21 -0
  236. office365/runtime/auth/authentication_context.py +123 -25
  237. office365/runtime/auth/client_credential.py +2 -2
  238. office365/runtime/auth/providers/acs_token_provider.py +6 -3
  239. office365/runtime/auth/providers/saml_token_provider.py +10 -7
  240. office365/runtime/auth/token_response.py +3 -3
  241. office365/runtime/client_object_collection.py +12 -7
  242. office365/runtime/client_result.py +9 -0
  243. office365/runtime/client_runtime_context.py +10 -8
  244. office365/runtime/http/request_options.py +2 -1
  245. office365/runtime/odata/request.py +4 -4
  246. office365/runtime/paths/appid.py +2 -1
  247. office365/runtime/paths/entity.py +2 -2
  248. office365/{sharepoint/internal/paths/entity.py → runtime/paths/key.py} +5 -3
  249. office365/runtime/paths/resource_path.py +3 -0
  250. office365/runtime/types/event_handler.py +6 -0
  251. office365/search/external/__init__.py +0 -0
  252. office365/search/external/configuration.py +8 -0
  253. office365/search/external/connection.py +27 -0
  254. office365/{external → search/external}/external.py +1 -1
  255. office365/search/external/search_settings.py +5 -0
  256. office365/search/query.py +3 -1
  257. office365/search/request.py +3 -1
  258. office365/search/sharepoint_onedrive_options.py +3 -0
  259. office365/search/sort_property.py +9 -0
  260. office365/sharepoint/activities/client_request.py +4 -1
  261. office365/sharepoint/activities/logger.py +25 -0
  262. office365/sharepoint/activities/revision_info.py +9 -0
  263. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  264. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  265. office365/sharepoint/alerts/alert.py +31 -0
  266. office365/sharepoint/apps/license_collection.py +1 -2
  267. office365/sharepoint/changes/item.py +14 -0
  268. office365/sharepoint/client_context.py +91 -30
  269. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  270. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  271. office365/sharepoint/compliance/tag_info.py +17 -0
  272. office365/sharepoint/contenttypes/collection.py +6 -7
  273. office365/sharepoint/contenttypes/content_type.py +49 -1
  274. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  275. office365/sharepoint/features/known_list.py +2 -0
  276. office365/sharepoint/fields/collection.py +70 -39
  277. office365/sharepoint/fields/computed.py +5 -2
  278. office365/sharepoint/fields/creation_information.py +5 -4
  279. office365/sharepoint/fields/field.py +73 -15
  280. office365/sharepoint/fields/user.py +3 -3
  281. office365/sharepoint/files/checked_out_file.py +3 -2
  282. office365/sharepoint/files/file.py +9 -4
  283. office365/sharepoint/files/versions/version.py +7 -9
  284. office365/sharepoint/folders/collection.py +2 -2
  285. office365/sharepoint/folders/coloring.py +39 -0
  286. office365/sharepoint/folders/coloring_information.py +15 -0
  287. office365/sharepoint/folders/folder.py +21 -10
  288. office365/sharepoint/forms/customization.py +8 -0
  289. office365/sharepoint/listitems/listitem.py +29 -10
  290. office365/sharepoint/lists/bloom_filter.py +0 -1
  291. office365/sharepoint/lists/creation_information.py +18 -4
  292. office365/sharepoint/lists/list.py +203 -27
  293. office365/sharepoint/lists/render_data_parameters.py +21 -1
  294. office365/sharepoint/lists/template_type.py +10 -0
  295. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  296. office365/sharepoint/navigation/metadata_settings.py +6 -4
  297. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  298. office365/sharepoint/permissions/securable_object.py +5 -6
  299. office365/sharepoint/portal/sites/manager.py +5 -6
  300. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  301. office365/sharepoint/publishing/base_custom_property.py +8 -0
  302. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  303. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  304. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  305. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  306. office365/sharepoint/publishing/pages/collection.py +1 -1
  307. office365/sharepoint/publishing/pages/page.py +4 -1
  308. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  309. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  310. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  311. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  312. office365/sharepoint/search/query/property_value.py +18 -0
  313. office365/sharepoint/search/request.py +16 -2
  314. office365/sharepoint/sharing/abilities.py +22 -0
  315. office365/sharepoint/sharing/direct_abilities.py +27 -0
  316. office365/sharepoint/sharing/link_abilities.py +9 -1
  317. office365/sharepoint/sharing/links/data.py +26 -1
  318. office365/sharepoint/sharing/links/info.py +1 -1
  319. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  320. office365/sharepoint/sharing/links/share_settings.py +24 -1
  321. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  322. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  323. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  324. office365/sharepoint/sharing/principal.py +10 -0
  325. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  326. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  327. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  328. office365/sharepoint/sitehealth/result.py +10 -0
  329. office365/sharepoint/sites/language.py +11 -1
  330. office365/sharepoint/sites/language_collection.py +1 -0
  331. office365/sharepoint/sites/site.py +42 -7
  332. office365/sharepoint/taxonomy/create_xml_parameters.py +22 -15
  333. office365/sharepoint/taxonomy/field.py +10 -8
  334. office365/sharepoint/taxonomy/groups/collection.py +8 -1
  335. office365/sharepoint/taxonomy/groups/group.py +26 -0
  336. office365/sharepoint/taxonomy/sets/collection.py +15 -0
  337. office365/sharepoint/taxonomy/sets/name.py +23 -0
  338. office365/sharepoint/taxonomy/sets/set.py +16 -1
  339. office365/sharepoint/taxonomy/stores/store.py +0 -8
  340. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  341. office365/sharepoint/tenant/administration/deny_add_and_customize_pages_status.py +3 -0
  342. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  343. office365/sharepoint/tenant/administration/sites/properties.py +12 -10
  344. office365/sharepoint/tenant/administration/tenant.py +2 -1
  345. office365/sharepoint/tenant/apps/information.py +3 -1
  346. office365/sharepoint/tenant/management/office365_tenant.py +14 -11
  347. office365/sharepoint/types/resource_path.py +3 -1
  348. office365/sharepoint/userprofiles/people_manager.py +0 -2
  349. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  350. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  351. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  352. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  353. office365/sharepoint/viva/site_manager.py +14 -0
  354. office365/sharepoint/webhooks/subscription_collection.py +5 -6
  355. office365/sharepoint/webparts/definition.py +1 -1
  356. office365/sharepoint/webparts/webpart.py +18 -4
  357. office365/sharepoint/webs/context_web_information.py +2 -4
  358. office365/sharepoint/webs/web.py +31 -12
  359. office365/sharepoint/workflowservices/manager.py +0 -2
  360. office365/subscriptions/collection.py +42 -0
  361. office365/subscriptions/subscription.py +120 -2
  362. office365/teams/apps/catalog.py +23 -0
  363. office365/teams/associated_info.py +12 -0
  364. office365/teams/channels/channel.py +2 -3
  365. office365/teams/channels/collection.py +1 -1
  366. office365/teams/channels/iIdentity.py +5 -0
  367. office365/teams/chats/chat.py +12 -2
  368. office365/teams/chats/collection.py +1 -2
  369. office365/teams/chats/messages/__init__.py +0 -0
  370. office365/teams/chats/messages/info.py +14 -0
  371. office365/teams/chats/{message.py → messages/message.py} +18 -3
  372. office365/teams/info.py +20 -0
  373. office365/teams/members/aad_user_conversation.py +2 -2
  374. office365/teams/members/conversation_collection.py +3 -3
  375. office365/teams/schedule/change_request.py +4 -2
  376. office365/teams/schedule/change_tracked_entity.py +11 -2
  377. office365/teams/summary.py +15 -0
  378. office365/teams/tabs/configuration.py +12 -1
  379. office365/teams/tabs/tab.py +0 -1
  380. office365/teams/team.py +34 -1
  381. office365/teams/teamwork/__init__.py +0 -0
  382. office365/teams/teamwork/activity_topic.py +5 -0
  383. office365/teams/teamwork/tags/__init__.py +0 -0
  384. office365/teams/teamwork/tags/identity.py +6 -0
  385. office365/teams/teamwork/tags/member.py +5 -0
  386. office365/teams/teamwork/tags/tag.py +15 -0
  387. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  388. office365/todo/attachments/session.py +34 -0
  389. office365/todo/linked_resource.py +10 -1
  390. office365/todo/tasks/task.py +4 -0
  391. office365/directory/identities/protection_root.py +0 -5
  392. office365/directory/rbac/application.py +0 -18
  393. office365/directory/rbac/unified_role_assignment.py +0 -8
  394. office365/external/connection.py +0 -5
  395. office365/intune/devices/management.py +0 -35
  396. office365/onedrive/internal/queries/download_content.py +0 -26
  397. office365/onedrive/internal/queries/upload_content.py +0 -23
  398. office365/outlook/mail/messages/message_rule.py +0 -15
  399. office365/runtime/auth/providers/oauth_token_provider.py +0 -25
  400. office365/teams/team_info.py +0 -6
  401. {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  402. {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  403. {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  404. /office365/{directory/rbac → booking}/__init__.py +0 -0
  405. /office365/directory/{roles → protection}/__init__.py +0 -0
  406. /office365/{external → directory/protection/riskyusers}/__init__.py +0 -0
  407. /office365/{teams/messages → directory/rolemanagement}/__init__.py +0 -0
  408. /office365/outlook/calendar/{time_slot.py → meetingtimes/time_slot.py} +0 -0
  409. /office365/teams/chats/{message_attachment.py → messages/attachment.py} +0 -0
  410. /office365/teams/{member_settings.py → members/settings.py} +0 -0
  411. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
@@ -10,6 +10,13 @@ class MessageCollection(DeltaCollection):
10
10
  def __init__(self, context, resource_path=None):
11
11
  super(MessageCollection, self).__init__(context, Message, resource_path)
12
12
 
13
+ def __getitem__(self, key):
14
+ """
15
+ :param int or str key: Message identifier oo index
16
+ :rtype: Message
17
+ """
18
+ return super(MessageCollection, self).__getitem__(key)
19
+
13
20
  def add(self, subject=None, body=None, to_recipients=None, **kwargs):
14
21
  """
15
22
  Create a draft of a new message in either JSON or MIME format.
@@ -0,0 +1,21 @@
1
+ from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
2
+ from office365.runtime.client_value import ClientValue
3
+
4
+
5
+ class FollowupFlag(ClientValue):
6
+ """Allows setting a flag in an item for the user to follow up on later."""
7
+
8
+ def __init__(self, completed_datetime=DateTimeTimeZone(), due_datetime=DateTimeTimeZone(),
9
+ flag_status=None, start_datetime=DateTimeTimeZone()):
10
+ """
11
+ :param DateTimeTimeZone completed_datetime: The date and time that the follow-up was finished.
12
+ :param DateTimeTimeZone due_datetime: The date and time that the follow up is to be finished.
13
+ Note: To set the due date, you must also specify the startDateTime; otherwise, you will
14
+ get a 400 Bad Request response.
15
+ :param str flag_status: The status for follow-up for an item.
16
+ :param DateTimeTimeZone start_datetime: The date and time that the follow-up is to begin.
17
+ """
18
+ self.completedDateTime = completed_datetime
19
+ self.dueDateTime = due_datetime
20
+ self.flagStatus = flag_status
21
+ self.startDateTime = start_datetime
@@ -0,0 +1,16 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class InternetMessageHeader(ClientValue):
5
+ """
6
+ A key-value pair that represents an Internet message header, as defined by RFC5322, that provides details of the
7
+ network path taken by a message from the sender to the recipient.
8
+ """
9
+
10
+ def __init__(self, name=None, value=None):
11
+ """
12
+ :param str name: Represents the key in a key-value pair.
13
+ :param str value:The value in a key-value pair.
14
+ """
15
+ self.name = name
16
+ self.value = value
@@ -1,10 +1,16 @@
1
1
  import os
2
+ import uuid
3
+ from datetime import datetime
2
4
 
5
+ from office365.directory.extensions.extended_property import SingleValueLegacyExtendedProperty, \
6
+ MultiValueLegacyExtendedProperty
3
7
  from office365.directory.extensions.extension import Extension
4
8
  from office365.entity_collection import EntityCollection
5
9
  from office365.outlook.item import OutlookItem
6
10
  from office365.outlook.mail.attachments.collection import AttachmentCollection
7
11
  from office365.outlook.mail.item_body import ItemBody
12
+ from office365.outlook.mail.messages.followup_flag import FollowupFlag
13
+ from office365.outlook.mail.messages.internet_header import InternetMessageHeader
8
14
  from office365.outlook.mail.recipient import Recipient
9
15
  from office365.runtime.client_result import ClientResult
10
16
  from office365.runtime.client_value_collection import ClientValueCollection
@@ -16,6 +22,23 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
16
22
  class Message(OutlookItem):
17
23
  """A message in a mailbox folder."""
18
24
 
25
+ def add_extended_property(self, name, value):
26
+ """
27
+ Create a single-value extended property for a message
28
+ :param str name: A property name
29
+ :param str value:
30
+ """
31
+ prop_id = str(uuid.uuid4())
32
+ prop_type = "String"
33
+ prop_value = [
34
+ {
35
+ "id":"{0} {{{1}}} Name {2}".format(prop_type, prop_id, name),
36
+ "value": value
37
+ }
38
+ ]
39
+ self.set_property("singleValueExtendedProperties", prop_value)
40
+ return self
41
+
19
42
  def create_forward(self, to_recipients=None, message=None, comment=None):
20
43
  """
21
44
  Create a draft to forward an existing message, in either JSON or MIME format.
@@ -57,8 +80,7 @@ class Message(OutlookItem):
57
80
  return return_type
58
81
 
59
82
  def add_file_attachment(
60
- self, name, content=None, content_type=None, base64_content=None
61
- ):
83
+ self, name, content=None, content_type=None, base64_content=None):
62
84
  """
63
85
  Attach a file to message
64
86
 
@@ -221,15 +243,134 @@ class Message(OutlookItem):
221
243
  value = ItemBody(value)
222
244
  self.set_property("body", value)
223
245
 
246
+ @property
247
+ def body_preview(self):
248
+ """
249
+ The first 255 characters of the message body. It is in text format.
250
+ :rtype: str or None
251
+ """
252
+ return self.properties.get("bodyPreview", None)
253
+
254
+ @property
255
+ def conversation_id(self):
256
+ """
257
+ The ID of the conversation the email belongs to.
258
+ :rtype: str or None
259
+ """
260
+ return self.properties.get("conversationId", None)
261
+
262
+ @property
263
+ def conversation_index(self):
264
+ """
265
+ Indicates the position of the message within the conversation.
266
+ :rtype: str or None
267
+ """
268
+ return self.properties.get("conversationIndex", None)
269
+
270
+ @property
271
+ def flag(self):
272
+ """
273
+ The flag value that indicates the status, start date, due date, or completion date for the message.
274
+ """
275
+ return self.properties.get("flag", FollowupFlag())
276
+
277
+ @property
278
+ def sent_from(self):
279
+ """
280
+ The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender
281
+ property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used.
282
+ Find out more about setting the from and sender properties of a message.
283
+ """
284
+ return self.properties.get("from", Recipient())
285
+
286
+ @property
287
+ def importance(self):
288
+ """
289
+ The importance of the message.
290
+ :rtype: str
291
+ """
292
+ return self.properties.get("importance", None)
293
+
294
+ @property
295
+ def inference_classification(self):
296
+ """
297
+ The classification of the message for the user, based on inferred relevance or importance,
298
+ or on an explicit override. The possible values are: focused or other.
299
+ :rtype: str
300
+ """
301
+ return self.properties.get("inferenceClassification", None)
302
+
303
+ @property
304
+ def internet_message_headers(self):
305
+ """
306
+ A collection of message headers defined by RFC5322. The set includes message headers indicating the network
307
+ path taken by a message from the sender to the recipient. It can also contain custom message headers that
308
+ hold app data for the message.
309
+ """
310
+ return self.properties.get("internetMessageHeaders", ClientValueCollection(InternetMessageHeader))
311
+
312
+ @property
313
+ def internet_message_id(self):
314
+ """
315
+ The message ID in the format specified by RFC2822
316
+ :rtype: str
317
+ """
318
+ return self.properties.get("internetMessageId", None)
319
+
320
+ @property
321
+ def is_delivery_receipt_requested(self):
322
+ """
323
+ Indicates whether a read receipt is requested for the message.
324
+ :rtype: bool
325
+ """
326
+ return self.properties.get("isDeliveryReceiptRequested", None)
327
+
328
+ @property
329
+ def is_draft(self):
330
+ """
331
+ Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.
332
+ :rtype: bool
333
+ """
334
+ return self.properties.get("isDraft", None)
335
+
336
+ @property
337
+ def is_read(self):
338
+ """
339
+ Indicates whether the message has been read.
340
+ :rtype: bool
341
+ """
342
+ return self.properties.get("isRead", None)
343
+
344
+ @property
345
+ def is_read_receipt_requested(self):
346
+ """
347
+ Indicates whether a read receipt is requested for the message.
348
+ :rtype: bool
349
+ """
350
+ return self.properties.get("isReadReceiptRequested", None)
351
+
352
+ @property
353
+ def received_datetime(self):
354
+ """The date and time the message was received."""
355
+ return self.properties.get("receivedDateTime", datetime.min)
356
+
357
+ @property
358
+ def sent_datetime(self):
359
+ """The date and time the message was sent."""
360
+ return self.properties.get("sentDateTime", datetime.min)
361
+
224
362
  @property
225
363
  def subject(self):
226
- """The subject of the message."""
364
+ """
365
+ The subject of the message.
366
+ :rtype: str
367
+ """
227
368
  return self.properties.get("subject", None)
228
369
 
229
370
  @subject.setter
230
371
  def subject(self, value):
231
- """The subject of the message.
232
-
372
+ """
373
+ The subject of the message.
233
374
  :type value: str
234
375
  """
235
376
  self.set_property("subject", value)
@@ -267,12 +408,49 @@ class Message(OutlookItem):
267
408
  """
268
409
  return self.properties.get('parentFolderId', None)
269
410
 
411
+ @property
412
+ def web_link(self):
413
+ """
414
+ The URL to open the message in Outlook on the web.
415
+
416
+ You can append an ispopout argument to the end of the URL to change how the message is displayed.
417
+ If ispopout is not present or if it is set to 1, then the message is shown in a popout window.
418
+ If ispopout is set to 0, then the browser will show the message in the Outlook on the web review pane.
419
+
420
+ The message will open in the browser if you are logged in to your mailbox via Outlook on the web.
421
+ You will be prompted to login if you are not already logged in with the browser.
422
+
423
+ This URL cannot be accessed from within an iFrame.
424
+ :rtype: str or None
425
+ """
426
+ return self.properties.get("webLink", None)
427
+
428
+ @property
429
+ def multi_value_extended_properties(self):
430
+ """The collection of multi-value extended properties defined for the event."""
431
+ return self.properties.get('multiValueExtendedProperties',
432
+ EntityCollection(self.context, MultiValueLegacyExtendedProperty,
433
+ ResourcePath("multiValueExtendedProperties", self.resource_path)))
434
+
435
+ @property
436
+ def single_value_extended_properties(self):
437
+ """The collection of single-value extended properties defined for the message"""
438
+ return self.properties.get('singleValueExtendedProperties',
439
+ EntityCollection(self.context, SingleValueLegacyExtendedProperty,
440
+ ResourcePath("singleValueExtendedProperties", self.resource_path)))
441
+
270
442
  def get_property(self, name, default_value=None):
271
443
  if default_value is None:
272
444
  property_type_mapping = {
273
445
  "toRecipients": self.to_recipients,
274
446
  "bccRecipients": self.bcc_recipients,
275
- "ccRecipients": self.cc_recipients
447
+ "ccRecipients": self.cc_recipients,
448
+ "from": self.sent_from,
449
+ "internetMessageHeaders": self.internet_message_headers,
450
+ "multiValueExtendedProperties": self.multi_value_extended_properties,
451
+ "receivedDateTime": self.received_datetime,
452
+ "sentDateTime": self.sent_datetime,
453
+ "singleValueExtendedProperties": self.single_value_extended_properties
276
454
  }
277
455
  default_value = property_type_mapping.get(name, None)
278
456
 
File without changes
@@ -0,0 +1,38 @@
1
+ from office365.outlook.mail.recipient import Recipient
2
+ from office365.runtime.client_value import ClientValue
3
+ from office365.runtime.client_value_collection import ClientValueCollection
4
+ from office365.runtime.types.collections import StringCollection
5
+
6
+
7
+ class MessageRuleActions(ClientValue):
8
+ """Represents the set of actions that are available to a rule."""
9
+
10
+ def __init__(self, assign_categories=None, copy_to_folder=None, delete=None,
11
+ forward_as_attachment_to=None, forward_to=None, mark_as_read=None, mark_importance=None,
12
+ move_to_folder=None, permanent_delete=None, redirect_to=None, stop_processing_rules=None):
13
+ """
14
+ :param list[str] assign_categories: A list of categories to be assigned to a message.
15
+ :param str copy_to_folder: The ID of a folder that a message is to be copied to.
16
+ :param bool delete: Indicates whether a message should be moved to the Deleted Items folder.
17
+ :param list[Recipient] forward_as_attachment_to: The email addresses of the recipients to which a message
18
+ should be forwarded as an attachment.
19
+ :param list[Recipient] forward_to: The email addresses of the recipients to which a message should be forwarded.
20
+ :param bool mark_as_read: Indicates whether a message should be marked as read.
21
+ :param str mark_importance: Sets the importance of the message, which can be: low, normal, high.
22
+ :param str move_to_folder: The ID of the folder that a message will be moved to.
23
+ :param bool permanent_delete: Indicates whether a message should be permanently deleted and not saved to the
24
+ Deleted Items folder.
25
+ :param list[Recipient] redirect_to: The email addresses to which a message should be redirected.
26
+ :param bool stop_processing_rules: Indicates whether subsequent rules should be evaluated.
27
+ """
28
+ self.assignCategories = StringCollection(assign_categories)
29
+ self.copyToFolder = copy_to_folder
30
+ self.delete = delete
31
+ self.forwardAsAttachmentTo = ClientValueCollection(Recipient, forward_as_attachment_to)
32
+ self.forwardTo = ClientValueCollection(Recipient, forward_to)
33
+ self.markAsRead = mark_as_read
34
+ self.markImportance = mark_importance
35
+ self.moveToFolder = move_to_folder
36
+ self.permanentDelete = permanent_delete
37
+ self.redirectTo = ClientValueCollection(Recipient, redirect_to)
38
+ self.stopProcessingRules = stop_processing_rules
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class MessageRulePredicates(ClientValue):
5
+ """Represents the set of conditions and exceptions that are available for a rule."""
@@ -0,0 +1,32 @@
1
+ from office365.entity import Entity
2
+ from office365.outlook.mail.messages.rules.actions import MessageRuleActions
3
+ from office365.outlook.mail.messages.rules.predicates import MessageRulePredicates
4
+
5
+
6
+ class MessageRule(Entity):
7
+ """A rule that applies to messages in the Inbox of a user.
8
+
9
+ In Outlook, you can set up rules for incoming messages in the Inbox to carry out specific internal
10
+ upon certain conditions."""
11
+
12
+ @property
13
+ def actions(self):
14
+ """Actions to be taken on a message when the corresponding conditions are fulfilled."""
15
+ return self.properties.get("actions", MessageRuleActions())
16
+
17
+ @property
18
+ def conditions(self):
19
+ """Conditions that when fulfilled, will trigger the corresponding actions for that rule."""
20
+ return self.properties.get("conditions", MessageRulePredicates())
21
+
22
+ @property
23
+ def exceptions(self):
24
+ """Exception conditions for the rule."""
25
+ return self.properties.get("exceptions", MessageRulePredicates())
26
+
27
+ @property
28
+ def is_read_only(self):
29
+ """
30
+ Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API.
31
+ """
32
+ return self.properties.get("isReadOnly", None)
@@ -1,3 +1,5 @@
1
+ from office365.outlook.mail.recurrence_pattern import RecurrencePattern
2
+ from office365.outlook.mail.recurrence_range import RecurrenceRange
1
3
  from office365.runtime.client_value import ClientValue
2
4
 
3
5
 
@@ -10,4 +12,15 @@ class PatternedRecurrence(ClientValue):
10
12
  unifiedRoleAssignmentScheduleRequest and unifiedRoleEligibilityScheduleRequest objects in PIM
11
13
  accessPackageAssignment objects in Azure AD entitlement management.
12
14
  """
13
- pass
15
+
16
+ def __init__(self, pattern=RecurrencePattern(), recurrence_range=RecurrenceRange()):
17
+ """
18
+ :param RecurrencePattern pattern: The frequency of an event.
19
+ For access reviews:
20
+ - Do not specify this property for a one-time access review.
21
+ - Only interval, dayOfMonth, and type (weekly, absoluteMonthly) properties of recurrencePattern
22
+ are supported.
23
+ :param RecurrenceRange recurrence_range: The duration of an event.
24
+ """
25
+ self.pattern = pattern
26
+ self.range = recurrence_range
@@ -4,13 +4,17 @@ from office365.runtime.client_value import ClientValue
4
4
  class PhysicalAddress(ClientValue):
5
5
  """The physical address of a contact."""
6
6
 
7
- def __init__(self, city=None, country_or_region=None, postal_code=None):
7
+ def __init__(self, city=None, country_or_region=None, postal_code=None, state=None, street=None):
8
8
  """
9
9
  :param str city: The city.
10
10
  :param str country_or_region: The country or region. It's a free-format string value, for example, "United States".
11
11
  :param str postal_code: The postal code.
12
+ :param str state:
13
+ :param str street:
12
14
  """
13
15
  super(PhysicalAddress, self).__init__()
14
16
  self.city = city
15
17
  self.countryOrRegion = country_or_region
16
18
  self.postalCode = postal_code
19
+ self.state = state
20
+ self.street = street
@@ -12,6 +12,9 @@ class Recipient(ClientValue):
12
12
  super(Recipient, self).__init__()
13
13
  self.emailAddress = email_address
14
14
 
15
+ def __repr__(self):
16
+ return repr(self.emailAddress)
17
+
15
18
  @staticmethod
16
19
  def from_email(value):
17
20
  """
@@ -1,13 +1,30 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.types.collections import StringCollection
2
3
 
3
4
 
4
5
  class RecurrencePattern(ClientValue):
5
6
  """Describes the frequency by which a recurring event repeats."""
6
7
 
7
- def __init__(self, day_of_month=None):
8
+ def __init__(self, day_of_month=None, days_of_week=None, first_day_of_week=None,
9
+ index=None, interval=None, month=None, pattern_type=None):
8
10
  """
9
11
  :param int day_of_month: The day of the month on which the event occurs. Required if type is absoluteMonthly
10
12
  or absoluteYearly.
13
+ :param list[str] days_of_week: A collection of the days of the week on which the event occurs
14
+ :param str first_day_of_week: The first day of the week
15
+ :param str index: Specifies on which instance of the allowed days specified in daysOfWeek the event occurs,
16
+ counted from the first instance in the month.
17
+ :param int interval: The number of units between occurrences, where units can be in days, weeks, months,
18
+ or years, depending on the type. Required.
19
+ :param int month: The month in which the event occurs. This is a number from 1 to 12.
20
+ :param str pattern_type: The recurrence pattern type: daily, weekly, absoluteMonthly, relativeMonthly,
21
+ absoluteYearly, relativeYearly
11
22
  """
12
23
  self.dayOfMonth = day_of_month
24
+ self.daysOfWeek = StringCollection(days_of_week)
25
+ self.firstDayOfWeek = first_day_of_week
26
+ self.index = index
27
+ self.interval = interval
28
+ self.month = month
29
+ self.type = pattern_type
13
30
 
@@ -7,8 +7,22 @@ class RecurrenceRange(ClientValue):
7
7
  of access reviews, calendar events, and access package assignments in Azure AD.
8
8
  """
9
9
 
10
- def __init__(self, end_date=None):
10
+ def __init__(self, start_date=None, end_date=None, number_of_occurrences=None, recurrence_timezone=None,
11
+ range_type=None):
11
12
  """
12
- :param str end_date:
13
+ :param datetime.date start_date: The date to start applying the recurrence pattern. The first occurrence of
14
+ the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the
15
+ same value as the start property of the recurring event. Required.
16
+ :param datetime.date end_date: The date to stop applying the recurrence pattern. Depending on the recurrence pattern of
17
+ the event, the last occurrence of the meeting may not be this date. Required if type is endDate.
18
+ :param int number_of_occurrences: The number of times to repeat the event. Required and must be positive
19
+ if type is numbered.
20
+ :param str recurrence_timezone: Time zone for the startDate and endDate properties. Optional. If not specified,
21
+ the time zone of the event is used.
22
+ :param str range_type: The recurrence range. The possible values are: endDate, noEnd, numbered. Required.
13
23
  """
14
24
  self.endDate = end_date
25
+ self.numberOfOccurrences = number_of_occurrences
26
+ self.recurrenceTimeZone = recurrence_timezone
27
+ self.startDate = start_date
28
+ self.type = range_type
@@ -12,3 +12,6 @@ class TimeZoneInformation(ClientValue):
12
12
  """
13
13
  self.alias = alias
14
14
  self.displayName = display_name
15
+
16
+ def __repr__(self):
17
+ return self.displayName
office365/reports/root.py CHANGED
@@ -1,11 +1,24 @@
1
+ from office365.directory.authentication.methods.root import AuthenticationMethodsRoot
1
2
  from office365.entity import Entity
2
3
  from office365.reports.internal.queries.create_report_query import create_report_query
4
+ from office365.reports.report import Report
5
+ from office365.reports.security.root import SecurityReportsRoot
3
6
  from office365.runtime.client_result import ClientResult
7
+ from office365.runtime.paths.resource_path import ResourcePath
4
8
  from office365.runtime.queries.function import FunctionQuery
5
9
 
6
10
 
7
11
  class ReportRoot(Entity):
8
- """The resource that represents an instance of History Reports."""
12
+ """Represents a container for Azure Active Directory (Azure AD) reporting resources."""
13
+
14
+ def managed_device_enrollment_top_failures(self, period=None):
15
+ """
16
+ Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
17
+ """
18
+ return_type = ClientResult(self.context, Report())
19
+ qry = FunctionQuery(self, "managedDeviceEnrollmentTopFailures", {"period": period}, return_type)
20
+ self.context.add_query(qry)
21
+ return return_type
9
22
 
10
23
  def get_email_activity_counts(self, period):
11
24
  """
@@ -174,3 +187,17 @@ class ReportRoot(Entity):
174
187
  qry = create_report_query(self, "getSharePointActivityUserDetail", period)
175
188
  self.context.add_query(qry)
176
189
  return qry.return_type
190
+
191
+ @property
192
+ def authentication_methods(self):
193
+ """Container for navigation properties for Azure AD authentication methods resources."""
194
+ return self.properties.get('authenticationMethods',
195
+ AuthenticationMethodsRoot(self.context,
196
+ ResourcePath("authenticationMethods",
197
+ self.resource_path)))
198
+
199
+ @property
200
+ def security(self):
201
+ """Container for navigation properties for Azure AD authentication methods resources."""
202
+ return self.properties.get('security',
203
+ SecurityReportsRoot(self.context, ResourcePath("security", self.resource_path)))
File without changes
@@ -0,0 +1,21 @@
1
+ from office365.directory.security.attacksimulations.repeat_offender import AttackSimulationRepeatOffender
2
+ from office365.entity import Entity
3
+ from office365.runtime.client_result import ClientResult
4
+ from office365.runtime.client_value_collection import ClientValueCollection
5
+ from office365.runtime.queries.function import FunctionQuery
6
+
7
+
8
+ class SecurityReportsRoot(Entity):
9
+ """
10
+ Represents an abstract type that contains resources for attack simulation and training reports. This resource
11
+ provides the ability to launch a realistic simulated phishing attack that organizations can learn from.
12
+ """
13
+
14
+ def get_attack_simulation_repeat_offenders(self):
15
+ """
16
+ List the tenant users who have yielded to attacks more than once in attack simulation and training campaigns.
17
+ """
18
+ return_type = ClientResult(self.context, ClientValueCollection(AttackSimulationRepeatOffender))
19
+ qry = FunctionQuery(self, "getAttackSimulationRepeatOffenders", None, return_type)
20
+ self.context.add_query(qry)
21
+ return return_type
File without changes
@@ -0,0 +1,17 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class UserRegistrationMethodCount(ClientValue):
5
+ """Represents the number of users registered for an authentication method."""
6
+
7
+ def __init__(self, authentication_method=None, user_count=None):
8
+ """
9
+ :param str authentication_method: Name of the authentication method.
10
+ :param str user_count: Number of users registered.
11
+ """
12
+ self.authenticationMethod = authentication_method
13
+ self.userCount = user_count
14
+
15
+ def __repr__(self):
16
+ return "{0}: {1}".format(self.authenticationMethod, self.userCount)
17
+
@@ -0,0 +1,21 @@
1
+ from office365.reports.userregistration.method_count import UserRegistrationMethodCount
2
+ from office365.runtime.client_value import ClientValue
3
+ from office365.runtime.client_value_collection import ClientValueCollection
4
+
5
+
6
+ class UserRegistrationMethodSummary(ClientValue):
7
+ """Represents the summary of number of users registered for each authentication method."""
8
+
9
+ def __init__(self, total_user_count=None, method_counts=None, user_roles=None, user_types=None):
10
+ """
11
+ :param int total_user_count: Total number of users in the tenant.
12
+ :param list[UserRegistrationMethodCount] method_counts: Number of users registered for each authentication
13
+ method.
14
+ :param str user_roles: The role type of the user.
15
+ Possible values are: all, privilegedAdmin, admin, user, unknownFutureValue.
16
+ :param str user_types: User type. Possible values are: all, member, guest, unknownFutureValue.
17
+ """
18
+ self.totalUserCount = total_user_count
19
+ self.userRegistrationMethodCounts = ClientValueCollection(UserRegistrationMethodCount, method_counts)
20
+ self.userRoles = user_roles
21
+ self.userTypes = user_types