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,4 +1,4 @@
1
- from office365.directory.protection.threatassessment.request import (
1
+ from office365.directory.protection.threatassessment.requests.request import (
2
2
  ThreatAssessmentRequest,
3
3
  )
4
4
  from office365.entity import Entity
@@ -11,6 +11,77 @@ from office365.runtime.queries.create_entity import CreateEntityQuery
11
11
  class InformationProtection(Entity):
12
12
  """Exposes methods that you can use to get Microsoft Purview Information Protection labels and label policies."""
13
13
 
14
+ def create_email_file_assessment(
15
+ self, recipient_email, content_data, expected_assessment, category
16
+ ):
17
+ """Create an email assessment request
18
+
19
+ :param str recipient_email: The mail recipient whose policies are used to assess the mail.
20
+ :param str content_data: Base64 encoded file content. The file content can't fetch back because it isn't stored.
21
+ :param str expected_assessment: The expected assessment from submitter. Possible values are: block, unblock.
22
+ :param str category: The threat category. Possible values are: spam, phishing, malware.
23
+ """
24
+
25
+ from office365.directory.protection.threatassessment.requests.email_file import (
26
+ EmailFileAssessmentRequest,
27
+ )
28
+
29
+ return_type = EmailFileAssessmentRequest(self.context)
30
+ return_type.set_property("recipientEmail", recipient_email)
31
+ return_type.set_property("contentData", content_data)
32
+ return_type.set_property("expectedAssessment", expected_assessment)
33
+ return_type.set_property("category", category)
34
+ self.threat_assessment_requests.add_child(return_type)
35
+ qry = CreateEntityQuery(
36
+ self.threat_assessment_requests, return_type, return_type
37
+ )
38
+ self.context.add_query(qry)
39
+ return return_type
40
+
41
+ def create_file_assessment(
42
+ self, file_name, content_data, expected_assessment, category
43
+ ):
44
+ """Create a new threat assessment request.
45
+
46
+ :param str file_name: File name
47
+ :param str content_data: Base64 encoded file content. The file content can't fetch back because it isn't stored.
48
+ :param str expected_assessment: The expected assessment from submitter. Possible values are: block, unblock.
49
+ :param str category: The threat category. Possible values are: spam, phishing, malware.
50
+ """
51
+
52
+ from office365.directory.protection.threatassessment.requests.file import (
53
+ FileAssessmentRequest,
54
+ )
55
+
56
+ return_type = FileAssessmentRequest(self.context)
57
+ return_type.set_property("fileName", file_name)
58
+ return_type.set_property("contentData", content_data)
59
+ return_type.set_property("expectedAssessment", expected_assessment)
60
+ return_type.set_property("category", category)
61
+ self.threat_assessment_requests.add_child(return_type)
62
+ qry = CreateEntityQuery(
63
+ self.threat_assessment_requests, return_type, return_type
64
+ )
65
+ self.context.add_query(qry)
66
+ return return_type
67
+
68
+ def create_url_assessment(self, url, expected_assessment, category):
69
+ """Create a new threat assessment request."""
70
+ from office365.directory.protection.threatassessment.requests.url import (
71
+ UrlAssessmentRequest,
72
+ )
73
+
74
+ return_type = UrlAssessmentRequest(self.context)
75
+ return_type.set_property("url", url)
76
+ return_type.set_property("expectedAssessment", expected_assessment)
77
+ return_type.set_property("category", category)
78
+ self.threat_assessment_requests.add_child(return_type)
79
+ qry = CreateEntityQuery(
80
+ self.threat_assessment_requests, return_type, return_type
81
+ )
82
+ self.context.add_query(qry)
83
+ return return_type
84
+
14
85
  def create_mail_assessment(
15
86
  self, message, recipient=None, expected_assessment="block", category="spam"
16
87
  ):
@@ -22,7 +93,7 @@ class InformationProtection(Entity):
22
93
  :param str category:
23
94
  """
24
95
 
25
- from office365.directory.protection.threatassessment.mail_request import (
96
+ from office365.directory.protection.threatassessment.requests.mail import (
26
97
  MailAssessmentRequest,
27
98
  )
28
99
 
@@ -4,7 +4,7 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
  from office365.runtime.types.collections import StringCollection
5
5
 
6
6
 
7
- class RiskyUserCollection(EntityCollection):
7
+ class RiskyUserCollection(EntityCollection[RiskyUser]):
8
8
  """RiskyUser's collection"""
9
9
 
10
10
  def __init__(self, context, resource_path=None):
@@ -1,6 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
- from office365.directory.protection.threatassessment.request import (
3
+ from office365.directory.protection.threatassessment.requests.request import (
4
4
  ThreatAssessmentRequest,
5
5
  )
6
6
 
@@ -18,3 +18,11 @@ class EmailFileAssessmentRequest(ThreatAssessmentRequest):
18
18
  Base64 encoded .eml email file content. The file content can't fetch back because it isn't stored.
19
19
  """
20
20
  return self.properties.get("contentData", None)
21
+
22
+ @property
23
+ def file_name(self):
24
+ # type: () -> Optional[str]
25
+ """
26
+ Base64 encoded .eml email file content. The file content can't fetch back because it isn't stored.
27
+ """
28
+ return self.properties.get("fileName", None)
@@ -0,0 +1,10 @@
1
+ from office365.directory.protection.threatassessment.requests.request import (
2
+ ThreatAssessmentRequest,
3
+ )
4
+
5
+
6
+ class FileAssessmentRequest(ThreatAssessmentRequest):
7
+ """Used to create and retrieve a file threat assessment, derived from threatAssessmentRequest.
8
+
9
+ The file can be a text file or Word document or binary file received in an email attachment.
10
+ """
@@ -1,4 +1,4 @@
1
- from office365.directory.protection.threatassessment.request import (
1
+ from office365.directory.protection.threatassessment.requests.request import (
2
2
  ThreatAssessmentRequest,
3
3
  )
4
4
 
@@ -0,0 +1,9 @@
1
+ from office365.directory.protection.threatassessment.requests.request import (
2
+ ThreatAssessmentRequest,
3
+ )
4
+
5
+
6
+ class UrlAssessmentRequest(ThreatAssessmentRequest):
7
+ """
8
+ Used to create and retrieve a URL threat assessment, derived from threatAssessmentRequest.
9
+ """
@@ -0,0 +1,14 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class AppScope(Entity):
5
+ """
6
+ The scope of a role assignment determines the set of resources for which the principal has been granted access.
7
+ An app scope is a scope defined and understood by a specific application, unlike directory scopes that are
8
+ shared scopes stored in the directory and understood by multiple applications.
9
+
10
+ This may be in both the following principal and scope scenarios:
11
+
12
+ A single principal and a single scope
13
+ Multiple principals and multiple scopes.
14
+ """
@@ -1,10 +1,10 @@
1
1
  from office365.directory.identitygovernance.privilegedaccess.unified_role_assignment_schedule_request import (
2
2
  UnifiedRoleAssignmentScheduleRequest,
3
3
  )
4
- from office365.directory.rolemanagement.unified_role_assignment import (
4
+ from office365.directory.rolemanagement.unifiedrole.assignment import (
5
5
  UnifiedRoleAssignment,
6
6
  )
7
- from office365.directory.rolemanagement.unified_role_definition import (
7
+ from office365.directory.rolemanagement.unifiedrole.definition import (
8
8
  UnifiedRoleDefinition,
9
9
  )
10
10
  from office365.entity import Entity
@@ -31,6 +31,7 @@ class RbacApplication(Entity):
31
31
  ),
32
32
  )
33
33
 
34
+ @property
34
35
  def role_definitions(self):
35
36
  # type: () -> EntityCollection[UnifiedRoleDefinition]
36
37
  """Resource representing the roles allowed by RBAC providers and the permissions assigned to the roles."""
@@ -1,6 +1,8 @@
1
1
  from typing import Optional
2
2
 
3
3
  from office365.directory.object import DirectoryObject
4
+ from office365.directory.permissions.scoped_role_membership import ScopedRoleMembership
5
+ from office365.entity_collection import EntityCollection
4
6
  from office365.runtime.paths.resource_path import ResourcePath
5
7
 
6
8
 
@@ -36,3 +38,16 @@ class DirectoryRole(DirectoryObject):
36
38
  self.context, ResourcePath("members", self.resource_path)
37
39
  ),
38
40
  )
41
+
42
+ @property
43
+ def scoped_members(self):
44
+ """Members of this directory role that are scoped to administrative units."""
45
+
46
+ return self.properties.get(
47
+ "scopedMembers",
48
+ EntityCollection(
49
+ self.context,
50
+ ScopedRoleMembership,
51
+ ResourcePath("scopedMembers", self.resource_path),
52
+ ),
53
+ )
@@ -1,6 +1,7 @@
1
1
  from typing import Optional
2
2
 
3
- from office365.directory.rolemanagement.unified_role_definition import (
3
+ from office365.directory.rolemanagement.app_scope import AppScope
4
+ from office365.directory.rolemanagement.unifiedrole.definition import (
4
5
  UnifiedRoleDefinition,
5
6
  )
6
7
  from office365.entity import Entity
@@ -30,6 +31,29 @@ class UnifiedRoleAssignment(Entity):
30
31
  """ """
31
32
  return self.properties.get("condition", None)
32
33
 
34
+ @property
35
+ def principal_id(self):
36
+ # type: () -> Optional[str]
37
+ """Identifier of the principal to which the assignment is granted. Supported principals are users,
38
+ role-assignable groups, and service principals. Supports $filter (eq, in)."""
39
+ return self.properties.get("principalId", None)
40
+
41
+ @property
42
+ def role_definition_id(self):
43
+ # type: () -> Optional[str]
44
+ """Identifier of the unifiedRoleDefinition the assignment is for. Read-only. Supports $filter (eq, in)."""
45
+ return self.properties.get("roleDefinitionId", None)
46
+
47
+ @property
48
+ def directory_scope_id(self):
49
+ # type: () -> Optional[str]
50
+ """Identifier of the directory object representing the scope of the assignment.
51
+ The scope of an assignment determines the set of resources for which the principal has been granted access.
52
+ Directory scopes are shared scopes stored in the directory that are understood by multiple applications,
53
+ unlike app scopes that are defined and understood by a resource application only. Supports $filter (eq, in).
54
+ """
55
+ return self.properties.get("directoryScopeId", None)
56
+
33
57
  @property
34
58
  def role_definition(self):
35
59
  """
@@ -42,9 +66,21 @@ class UnifiedRoleAssignment(Entity):
42
66
  ),
43
67
  )
44
68
 
69
+ @property
70
+ def app_scope(self):
71
+ """
72
+ Read-only property with details of the app specific scope when the assignment scope is app specific.
73
+ Containment entity. Supports $expand for the entitlement provider only.
74
+ """
75
+ return self.properties.get(
76
+ "appScope",
77
+ AppScope(self.context, ResourcePath("appScope", self.resource_path)),
78
+ )
79
+
45
80
  def get_property(self, name, default_value=None):
46
81
  if default_value is None:
47
82
  property_mapping = {
83
+ "appScope": self.app_scope,
48
84
  "roleDefinition": self.role_definition,
49
85
  }
50
86
  default_value = property_mapping.get(name, None)
@@ -1,6 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
- from office365.directory.rolemanagement.unified_role_permission import (
3
+ from office365.directory.rolemanagement.unifiedrole.permission import (
4
4
  UnifiedRolePermission,
5
5
  )
6
6
  from office365.entity import Entity
@@ -13,6 +13,9 @@ class UnifiedRoleDefinition(Entity):
13
13
  """A role definition is a collection of permissions in Azure Active Directory (Azure AD) listing the operations
14
14
  that can be performed and the resources against which they can performed."""
15
15
 
16
+ def __str__(self):
17
+ return self.display_name or self.entity_type_name
18
+
16
19
  @property
17
20
  def display_name(self):
18
21
  # type: () -> Optional[str]
@@ -29,6 +32,7 @@ class UnifiedRoleDefinition(Entity):
29
32
 
30
33
  @property
31
34
  def role_permissions(self):
35
+ # type: () -> ClientValueCollection[UnifiedRolePermission]
32
36
  """
33
37
  List of permissions included in the role. Read-only when isBuiltIn is true. Required.
34
38
  """
@@ -56,6 +60,7 @@ class UnifiedRoleDefinition(Entity):
56
60
  if default_value is None:
57
61
  property_mapping = {
58
62
  "inheritsPermissionsFrom": self.inherits_permissions_from,
63
+ "rolePermissions": self.role_permissions,
59
64
  }
60
65
  default_value = property_mapping.get(name, None)
61
66
  return super(UnifiedRoleDefinition, self).get_property(name, default_value)
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class FileSecurityState(ClientValue):
5
+ """Contains information about the file (not process) related to the alert."""
@@ -26,3 +26,11 @@ class SimulationAutomation(Entity):
26
26
  ResourcePath("runs", self.resource_path),
27
27
  ),
28
28
  )
29
+
30
+ def get_property(self, name, default_value=None):
31
+ if default_value is None:
32
+ property_mapping = {
33
+ "createdBy": self.created_by,
34
+ }
35
+ default_value = property_mapping.get(name, None)
36
+ return super(SimulationAutomation, self).get_property(name, default_value)
@@ -1,5 +1,13 @@
1
+ from typing import Optional
2
+
1
3
  from office365.entity import Entity
2
4
 
3
5
 
4
6
  class SimulationAutomationRun(Entity):
5
7
  """Represents a run of an attack simulation automation on a tenant."""
8
+
9
+ @property
10
+ def simulation_id(self):
11
+ # type: () -> Optional[str]
12
+ """"""
13
+ return self.properties.get("simulationId", None)
@@ -1,6 +1,13 @@
1
+ from office365.directory.security.attacksimulations.user import AttackSimulationUser
1
2
  from office365.runtime.client_value import ClientValue
2
3
 
3
4
 
4
5
  class AttackSimulationRepeatOffender(ClientValue):
5
6
  """Represents a user in a tenant who has given way to attacks more than once across various attack simulation
6
7
  and training campaigns."""
8
+
9
+ def __init__(
10
+ self, attack_simulation_user=AttackSimulationUser(), repeat_offence_count=None
11
+ ):
12
+ self.attackSimulationUser = attack_simulation_user
13
+ self.repeatOffenceCount = repeat_offence_count
@@ -14,11 +14,11 @@ class SimulationReport(ClientValue):
14
14
  participated in the campaign.
15
15
  """
16
16
 
17
- def __init__(self, overview=SimulationReportOverview(), simulationUsers=None):
17
+ def __init__(self, overview=SimulationReportOverview(), simulation_users=None):
18
18
  """
19
19
  :param SimulationReportOverview overview: Overview of an attack simulation and training campaign.
20
20
  """
21
21
  self.overview = overview
22
22
  self.simulationUsers = ClientValueCollection(
23
- UserSimulationDetails, simulationUsers
23
+ UserSimulationDetails, simulation_users
24
24
  )
@@ -3,3 +3,8 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class AttackSimulationUser(ClientValue):
5
5
  """Represents a user in an attack simulation and training campaign."""
6
+
7
+ def __init__(self, display_name=None, email=None, user_id=None):
8
+ self.displayName = display_name
9
+ self.email = email
10
+ self.userId = user_id
@@ -44,7 +44,7 @@ class Incident(Entity):
44
44
  @property
45
45
  def created_datetime(self):
46
46
  """Time when the incident was first created."""
47
- return self.properties("createdDateTime", datetime.min)
47
+ return self.properties.get("createdDateTime", datetime.min)
48
48
 
49
49
  @property
50
50
  def alerts(self):
@@ -57,6 +57,11 @@ class Incident(Entity):
57
57
  ),
58
58
  )
59
59
 
60
+ @property
61
+ def entity_type_name(self):
62
+ # type: () -> str
63
+ return "microsoft.graph.security.incident"
64
+
60
65
  def get_property(self, name, default_value=None):
61
66
  if default_value is None:
62
67
  property_mapping = {"createdDateTime": self.created_datetime}
@@ -123,3 +123,8 @@ class Security(Entity):
123
123
  }
124
124
  default_value = property_mapping.get(name, None)
125
125
  return super(Security, self).get_property(name, default_value)
126
+
127
+ @property
128
+ def entity_type_name(self):
129
+ # type: () -> str
130
+ return "microsoft.graph.security.alert"
File without changes
@@ -0,0 +1,7 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class CompanySubscription(Entity):
5
+ """Represents a commercial subscription for a tenant. Use the values of skuId and serviceStatus > servicePlanId
6
+ to assign licenses to unassigned users and groups through the user: assignLicense and group: assignLicense
7
+ APIs respectively."""
@@ -3,3 +3,15 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class SynchronizationProgress(ClientValue):
5
5
  """Represents the progress of a synchronizationJob toward completion."""
6
+
7
+ def __init__(
8
+ self,
9
+ completed_units=None,
10
+ progress_observation_date_time=None,
11
+ total_units=None,
12
+ units=None,
13
+ ):
14
+ self.completedUnits = completed_units
15
+ self.progressObservationDateTime = progress_observation_date_time
16
+ self.totalUnits = total_units
17
+ self.units = units
@@ -57,6 +57,11 @@ class UserActivity(Entity):
57
57
  """Set by the server. DateTime in UTC when the object was created on the server."""
58
58
  return self.properties.get("createdDateTime", datetime.min)
59
59
 
60
+ @property
61
+ def expiration_datetime(self):
62
+ """Set by the server. DateTime in UTC when the object was created on the server."""
63
+ return self.properties.get("expirationDateTime", datetime.min)
64
+
60
65
  @property
61
66
  def history_items(self):
62
67
  """NavigationProperty/Containment; navigation property to the associated activity."""
@@ -75,6 +80,10 @@ class UserActivity(Entity):
75
80
 
76
81
  def get_property(self, name, default_value=None):
77
82
  if default_value is None:
78
- property_mapping = {"historyItems": self.history_items}
83
+ property_mapping = {
84
+ "createdDateTime": self.created_datetime,
85
+ "expirationDateTime": self.expiration_datetime,
86
+ "historyItems": self.history_items,
87
+ }
79
88
  default_value = property_mapping.get(name, None)
80
89
  return super(UserActivity, self).get_property(name, default_value)
@@ -1,3 +1,7 @@
1
+ from typing import Optional
2
+
3
+ from office365.directory.users.insights_settings import UserInsightsSettings
4
+ from office365.directory.users.storage import UserStorage
1
5
  from office365.entity import Entity
2
6
  from office365.runtime.paths.resource_path import ResourcePath
3
7
  from office365.teams.schedule.shifts.preferences import ShiftPreferences
@@ -6,6 +10,41 @@ from office365.teams.schedule.shifts.preferences import ShiftPreferences
6
10
  class UserSettings(Entity):
7
11
  """The current user settings for content discovery."""
8
12
 
13
+ @property
14
+ def contribution_to_content_discovery_as_organization_disabled(self):
15
+ # type: () -> Optional[bool]
16
+ """Reflects the organization level setting controlling delegate access to the trending API.
17
+ When set to true, the organization doesn't have access to Office Delve. The relevancy of the content
18
+ displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the Discover view in
19
+ OneDrive for work or school is affected for the whole organization. This setting is read-only and can only
20
+ be changed by administrators in the SharePoint admin center."""
21
+ return self.properties.get(
22
+ "contributionToContentDiscoveryAsOrganizationDisabled", None
23
+ )
24
+
25
+ @property
26
+ def contribution_to_content_discovery_disabled(self):
27
+ # type: () -> Optional[bool]
28
+ """When set to true, the delegate access to the user's trending API is disabled.
29
+ When set to true, documents in the user's Office Delve are disabled. When set to true, the relevancy of
30
+ the content displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the
31
+ Discover view in OneDrive for work or school is affected. Users can control this setting in Office Delve
32
+ """
33
+ return self.properties.get("contributionToContentDiscoveryDisabled", None)
34
+
35
+ @property
36
+ def item_insights(self):
37
+ # type: () -> UserInsightsSettings
38
+ """The user's settings for the visibility of meeting hour insights, and insights derived between
39
+ a user and other items in Microsoft 365, such as documents or sites.
40
+ Get userInsightsSettings through this navigation property."""
41
+ return self.properties.get(
42
+ "itemInsights",
43
+ UserInsightsSettings(
44
+ self.context, ResourcePath("itemInsights", self.resource_path)
45
+ ),
46
+ )
47
+
9
48
  @property
10
49
  def shift_preferences(self):
11
50
  # type: () -> ShiftPreferences
@@ -16,8 +55,19 @@ class UserSettings(Entity):
16
55
  ),
17
56
  )
18
57
 
58
+ @property
59
+ def storage(self):
60
+ # type: () -> ShiftPreferences
61
+ return self.properties.get(
62
+ "storage",
63
+ UserStorage(self.context, ResourcePath("storage", self.resource_path)),
64
+ )
65
+
19
66
  def get_property(self, name, default_value=None):
20
67
  if default_value is None:
21
- property_mapping = {"shiftPreferences": self.shift_preferences}
68
+ property_mapping = {
69
+ "itemInsights": self.item_insights,
70
+ "shiftPreferences": self.shift_preferences,
71
+ }
22
72
  default_value = property_mapping.get(name, None)
23
73
  return super(UserSettings, self).get_property(name, default_value)
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class UserStorage(Entity):
5
+ """"""